home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: cdecl-2
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| POSIX tar archive (GNU)
| default
| |
99%
| file
| POSIX tar archive (GNU), directory cdecl-2.5/, mode 40755 , uid 767 , gid 144 , size 0 , seconds 6076635641, user drc, group users
| default
| |
98%
| file
| data
| default
| |
62%
| TrID
| TAR - Tape ARchive (GNU)
| default
| |
37%
| TrID
| TAR - Tape ARchive (directory)
| default
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| GNU tar archive
| default
| |
100%
| detectItEasy
| Archive: tar
| default
| |
100%
| binwalkID
| POSIX tar archive (GNU), owner user name: "5/"
| default
| |
100%
| xdgMime
| application/x-tar
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 63 64 65 63 6c 2d 32 2e | 35 2f 00 00 00 00 00 00 |cdecl-2.|5/......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 20 37 |.... 407|55 . 7|
|00000070| 36 37 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |67 . 1|44 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 36 30 37 36 36 33 35 | 0 | 6076635|
|00000090| 36 34 31 20 20 31 30 35 | 33 31 00 20 35 00 00 00 |641 105|31. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 64 72 63 00 00 00 00 |.ustar |.drc....|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 63 64 65 63 6c 2d 32 2e | 35 2f 52 45 41 44 4d 45 |cdecl-2.|5/README|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 20 37 |....1006|44 . 7|
|00000270| 36 37 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |67 . 1|44 . |
|00000280| 20 20 20 35 36 35 36 20 | 20 36 30 37 36 36 33 34 | 5656 | 6076634|
|00000290| 37 33 30 20 20 31 31 35 | 32 30 00 20 30 00 00 00 |730 115|20. 0...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 20 20 | 00 64 72 63 00 00 00 00 |.ustar |.drc....|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 0a 09 09 09 43 64 65 63 | 6c 20 76 65 72 73 69 6f |....Cdec|l versio|
|00000410| 6e 20 32 2e 35 0a 0a 43 | 64 65 63 6c 20 69 73 20 |n 2.5..C|decl is |
|00000420| 61 20 70 72 6f 67 72 61 | 6d 20 77 68 69 63 68 20 |a progra|m which |
|00000430| 77 69 6c 6c 20 74 75 72 | 6e 20 45 6e 67 6c 69 73 |will tur|n Englis|
|00000440| 68 2d 6c 69 6b 65 20 70 | 68 72 61 73 65 73 20 73 |h-like p|hrases s|
|00000450| 75 63 68 20 61 73 20 22 | 64 65 63 6c 61 72 65 0a |uch as "|declare.|
|00000460| 66 6f 6f 20 61 73 20 61 | 72 72 61 79 20 35 20 6f |foo as a|rray 5 o|
|00000470| 66 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 66 75 6e |f pointe|r to fun|
|00000480| 63 74 69 6f 6e 20 72 65 | 74 75 72 6e 69 6e 67 20 |ction re|turning |
|00000490| 69 6e 74 22 20 69 6e 74 | 6f 20 43 20 64 65 63 6c |int" int|o C decl|
|000004a0| 61 72 61 74 69 6f 6e 73 | 0a 73 75 63 68 20 61 73 |arations|.such as|
|000004b0| 20 22 69 6e 74 20 28 2a | 66 6f 6f 5b 35 5d 29 28 | "int (*|foo[5])(|
|000004c0| 29 22 2e 20 20 49 74 20 | 63 61 6e 20 61 6c 73 6f |)". It |can also|
|000004d0| 20 74 72 61 6e 73 6c 61 | 74 65 20 74 68 65 20 43 | transla|te the C|
|000004e0| 20 69 6e 74 6f 20 74 68 | 65 20 70 73 65 75 64 6f | into th|e pseudo|
|000004f0| 2d 0a 45 6e 67 6c 69 73 | 68 2e 20 20 41 6e 64 20 |-.Englis|h. And |
|00000500| 69 74 20 68 61 6e 64 6c | 65 73 20 74 79 70 65 63 |it handl|es typec|
|00000510| 61 73 74 73 2c 20 74 6f | 6f 2e 20 20 50 6c 75 73 |asts, to|o. Plus|
|00000520| 20 43 2b 2b 2e 20 20 41 | 6e 64 20 69 6e 20 74 68 | C++. A|nd in th|
|00000530| 69 73 20 76 65 72 73 69 | 6f 6e 0a 69 74 20 68 61 |is versi|on.it ha|
|00000540| 73 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 65 |s comman|d line e|
|00000550| 64 69 74 69 6e 67 20 61 | 6e 64 20 68 69 73 74 6f |diting a|nd histo|
|00000560| 72 79 20 77 69 74 68 20 | 74 68 65 20 47 4e 55 20 |ry with |the GNU |
|00000570| 72 65 61 64 6c 69 6e 65 | 20 6c 69 62 72 61 72 79 |readline| library|
|00000580| 2e 0a 0a 54 68 65 20 66 | 69 6c 65 73 20 69 6e 20 |...The f|iles in |
|00000590| 74 68 69 73 20 64 69 73 | 74 72 69 62 75 74 69 6f |this dis|tributio|
|000005a0| 6e 20 61 72 65 3a 0a 0a | 63 64 65 63 6c 2e 63 09 |n are:..|cdecl.c.|
|000005b0| 09 54 68 65 20 63 64 65 | 63 6c 20 73 6f 75 72 63 |.The cde|cl sourc|
|000005c0| 65 20 63 6f 64 65 2e 0a | 63 64 6c 65 78 2e 6c 09 |e code..|cdlex.l.|
|000005d0| 09 54 68 65 20 6c 65 78 | 20 73 6f 75 72 63 65 20 |.The lex| source |
|000005e0| 66 6f 72 20 74 68 65 20 | 63 64 65 63 6c 20 6c 65 |for the |cdecl le|
|000005f0| 78 65 72 2e 0a 63 64 67 | 72 61 6d 2e 79 09 54 68 |xer..cdg|ram.y.Th|
|00000600| 65 20 79 61 63 63 20 73 | 6f 75 72 63 65 20 66 6f |e yacc s|ource fo|
|00000610| 72 20 74 68 65 20 63 64 | 65 63 6c 20 70 61 72 73 |r the cd|ecl pars|
|00000620| 65 72 2e 0a 63 64 65 63 | 6c 2e 31 09 09 54 68 65 |er..cdec|l.1..The|
|00000630| 20 63 64 65 63 6c 20 6d | 61 6e 20 70 61 67 65 2e | cdecl m|an page.|
|00000640| 0a 63 2b 2b 64 65 63 6c | 2e 31 09 54 68 65 20 63 |.c++decl|.1.The c|
|00000650| 2b 2b 64 65 63 6c 20 6d | 61 6e 20 70 61 67 65 20 |++decl m|an page |
|00000660| 28 72 65 61 6c 6c 79 20 | 6a 75 73 74 20 63 64 65 |(really |just cde|
|00000670| 63 6c 2e 31 29 2e 0a 74 | 65 73 74 73 65 74 09 09 |cl.1)..t|estset..|
|00000680| 41 20 73 63 72 69 70 74 | 20 74 6f 20 74 65 73 74 |A script| to test|
|00000690| 20 74 68 65 20 6f 70 65 | 72 61 74 69 6f 6e 20 6f | the ope|ration o|
|000006a0| 66 20 63 64 65 63 6c 2e | 0a 74 65 73 74 73 65 74 |f cdecl.|.testset|
|000006b0| 2b 2b 09 41 20 73 63 72 | 69 70 74 20 74 6f 20 74 |++.A scr|ipt to t|
|000006c0| 65 73 74 20 74 68 65 20 | 6f 70 65 72 61 74 69 6f |est the |operatio|
|000006d0| 6e 20 6f 66 20 63 2b 2b | 64 65 63 6c 2e 0a 4d 61 |n of c++|decl..Ma|
|000006e0| 6b 65 66 69 6c 65 09 54 | 68 65 20 6d 61 6b 65 66 |kefile.T|he makef|
|000006f0| 69 6c 65 20 74 6f 20 62 | 75 69 6c 64 20 61 6e 64 |ile to b|uild and|
|00000700| 20 69 6e 73 74 61 6c 6c | 20 63 64 65 63 6c 2e 0a | install| cdecl..|
|00000710| 52 45 41 44 4d 45 09 09 | 53 65 65 20 66 69 6c 65 |README..|See file|
|00000720| 20 52 45 41 44 4d 45 20 | 66 6f 72 20 64 65 73 63 | README |for desc|
|00000730| 72 69 70 74 69 6f 6e 20 | 6f 66 20 74 68 69 73 20 |ription |of this |
|00000740| 66 69 6c 65 2e 0a 0a 49 | 66 20 79 6f 75 20 68 61 |file...I|f you ha|
|00000750| 76 65 20 74 68 65 20 47 | 4e 55 20 72 65 61 64 6c |ve the G|NU readl|
|00000760| 69 6e 65 20 6c 69 62 72 | 61 72 79 20 61 6e 64 20 |ine libr|ary and |
|00000770| 69 74 73 20 68 65 61 64 | 65 72 73 20 69 6e 20 72 |its head|ers in r|
|00000780| 65 61 64 6c 69 6e 65 2f | 2a 2e 68 20 61 6e 64 0a |eadline/|*.h and.|
|00000790| 74 65 72 6d 63 61 70 20 | 74 68 65 6e 20 79 6f 75 |termcap |then you|
|000007a0| 20 63 61 6e 20 69 6e 73 | 74 61 6c 6c 20 63 64 65 | can ins|tall cde|
|000007b0| 63 6c 20 62 79 20 22 6d | 61 6b 65 22 20 66 6f 6c |cl by "m|ake" fol|
|000007c0| 6c 6f 77 65 64 20 62 79 | 20 22 6d 61 6b 65 20 69 |lowed by| "make i|
|000007d0| 6e 73 74 61 6c 6c 22 2e | 0a 54 6f 20 63 6f 6d 70 |nstall".|.To comp|
|000007e0| 69 6c 65 20 77 69 74 68 | 6f 75 74 20 72 65 61 64 |ile with|out read|
|000007f0| 6c 69 6e 65 20 61 6e 64 | 20 74 65 72 6d 63 61 70 |line and| termcap|
|00000800| 2c 20 79 6f 75 20 6d 75 | 73 74 20 65 64 69 74 20 |, you mu|st edit |
|00000810| 74 68 65 20 4d 61 6b 65 | 66 69 6c 65 20 61 6e 64 |the Make|file and|
|00000820| 0a 72 65 6d 6f 76 65 20 | 2d 44 55 53 45 5f 52 45 |.remove |-DUSE_RE|
|00000830| 41 44 4c 49 4e 45 20 66 | 72 6f 6d 20 74 68 65 20 |ADLINE f|rom the |
|00000840| 43 46 4c 41 47 53 20 61 | 6e 64 20 2d 6c 72 65 61 |CFLAGS a|nd -lrea|
|00000850| 64 6c 69 6e 65 20 61 6e | 64 20 2d 6c 74 65 72 6d |dline an|d -lterm|
|00000860| 63 61 70 20 66 72 6f 6d | 0a 74 68 65 20 4c 49 42 |cap from|.the LIB|
|00000870| 53 2e 20 20 59 6f 75 20 | 77 69 6c 6c 2c 20 75 6e |S. You |will, un|
|00000880| 66 6f 72 74 75 6e 61 74 | 65 6c 79 2c 20 6c 6f 73 |fortunat|ely, los|
|00000890| 65 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |e the co|mmand li|
|000008a0| 6e 65 20 65 64 69 74 69 | 6e 67 2c 0a 68 69 73 74 |ne editi|ng,.hist|
|000008b0| 6f 72 79 2c 20 61 6e 64 | 20 6b 65 79 77 6f 72 64 |ory, and| keyword|
|000008c0| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 2e 20 20 42 79 | complet|ion. By|
|000008d0| 20 64 65 66 61 75 6c 74 | 20 63 64 65 63 6c 20 69 | default| cdecl i|
|000008e0| 6e 73 74 61 6c 6c 73 20 | 69 6e 20 2f 75 73 72 2f |nstalls |in /usr/|
|000008f0| 62 69 6e 2c 0a 62 75 74 | 20 74 68 69 73 20 69 73 |bin,.but| this is|
|00000900| 20 63 6f 6e 66 69 67 75 | 72 61 62 6c 65 20 69 6e | configu|rable in|
|00000910| 20 74 68 65 20 4d 61 6b | 65 66 69 6c 65 2e 0a 0a | the Mak|efile...|
|00000920| 49 20 64 65 62 61 74 65 | 64 20 77 69 74 68 20 6d |I debate|d with m|
|00000930| 79 73 65 6c 66 20 77 68 | 65 74 68 65 72 20 74 6f |yself wh|ether to|
|00000940| 20 70 72 6f 76 69 64 65 | 20 61 20 70 72 65 63 6f | provide| a preco|
|00000950| 6d 70 69 6c 65 64 20 6c | 69 62 72 65 61 64 6c 69 |mpiled l|ibreadli|
|00000960| 6e 65 2e 61 20 61 6e 64 | 0a 61 73 73 6f 63 69 61 |ne.a and|.associa|
|00000970| 74 65 64 20 68 65 61 64 | 65 72 73 20 77 69 74 68 |ted head|ers with|
|00000980| 20 74 68 65 20 63 64 65 | 63 6c 20 64 69 73 74 72 | the cde|cl distr|
|00000990| 69 62 75 74 69 6f 6e 2c | 20 68 6f 77 65 76 65 72 |ibution,| however|
|000009a0| 20 74 68 61 74 20 77 6f | 75 6c 64 20 68 61 76 65 | that wo|uld have|
|000009b0| 0a 6d 61 64 65 20 74 68 | 65 20 74 61 72 20 66 69 |.made th|e tar fi|
|000009c0| 6c 65 20 2a 6d 75 63 68 | 2a 20 62 69 67 67 65 72 |le *much|* bigger|
|000009d0| 2c 20 73 6f 20 49 20 68 | 61 76 65 20 64 65 63 69 |, so I h|ave deci|
|000009e0| 64 65 64 20 6e 6f 74 20 | 74 6f 2e 20 20 49 66 20 |ded not |to. If |
|000009f0| 79 6f 75 20 74 68 69 6e | 6b 0a 49 20 73 68 6f 75 |you thin|k.I shou|
|00000a00| 6c 64 2c 20 6f 72 20 79 | 6f 75 20 77 6f 75 6c 64 |ld, or y|ou would|
|00000a10| 20 6c 69 6b 65 20 6d 65 | 20 74 6f 20 73 65 6e 64 | like me| to send|
|00000a20| 20 79 6f 75 20 72 65 61 | 64 6c 69 6e 65 2c 20 70 | you rea|dline, p|
|00000a30| 6c 65 61 73 65 20 67 65 | 74 20 69 6e 20 74 6f 75 |lease ge|t in tou|
|00000a40| 63 68 0a 77 69 74 68 20 | 6d 65 20 61 74 20 63 6f |ch.with |me at co|
|00000a50| 6e 72 61 64 40 64 65 74 | 72 6f 69 74 2e 66 72 65 |nrad@det|roit.fre|
|00000a60| 65 6e 65 74 2e 6f 72 67 | 2e 20 20 59 6f 75 20 63 |enet.org|. You c|
|00000a70| 61 6e 20 66 69 6e 64 20 | 74 68 65 20 73 6f 75 72 |an find |the sour|
|00000a80| 63 65 20 66 6f 72 0a 72 | 65 61 64 6c 69 6e 65 20 |ce for.r|eadline |
|00000a90| 69 6e 20 74 68 65 20 62 | 61 73 68 20 64 69 73 74 |in the b|ash dist|
|00000aa0| 72 69 62 75 74 69 6f 6e | 20 6f 6e 20 70 72 65 70 |ribution| on prep|
|00000ab0| 2e 61 69 2e 6d 69 74 2e | 65 64 75 3a 2f 70 75 62 |.ai.mit.|edu:/pub|
|00000ac0| 2f 67 6e 75 20 6f 72 20 | 6f 6e 0a 66 74 70 2e 75 |/gnu or |on.ftp.u|
|00000ad0| 75 2e 6e 65 74 3a 2f 70 | 75 62 2f 67 6e 75 2c 20 |u.net:/p|ub/gnu, |
|00000ae0| 6f 72 20 77 68 65 72 65 | 76 65 72 20 66 69 6e 65 |or where|ver fine|
|00000af0| 20 47 4e 55 20 73 6f 75 | 72 63 65 20 69 73 6e 27 | GNU sou|rce isn'|
|00000b00| 74 20 73 6f 6c 64 2e 0a | 0a 59 6f 75 20 73 68 6f |t sold..|.You sho|
|00000b10| 75 6c 64 20 61 6c 73 6f | 20 62 65 20 61 62 6c 65 |uld also| be able|
|00000b20| 20 74 6f 20 66 69 6e 64 | 20 61 20 72 65 61 64 79 | to find| a ready|
|00000b30| 2d 74 6f 2d 72 75 6e 20 | 45 4c 46 20 62 69 6e 61 |-to-run |ELF bina|
|00000b40| 72 79 20 6f 66 20 63 64 | 65 63 6c 20 69 6e 20 74 |ry of cd|ecl in t|
|00000b50| 68 65 0a 73 61 6d 65 20 | 70 6c 61 63 65 20 79 6f |he.same |place yo|
|00000b60| 75 20 67 6f 74 20 74 68 | 69 73 20 66 72 6f 6d 2e |u got th|is from.|
|00000b70| 20 20 49 74 20 73 68 6f | 75 6c 64 20 62 65 20 6f | It sho|uld be o|
|00000b80| 6e 20 73 75 6e 73 69 74 | 65 2e 75 6e 63 2e 65 64 |n sunsit|e.unc.ed|
|00000b90| 75 20 69 6e 20 74 68 65 | 0a 64 69 72 65 63 74 6f |u in the|.directo|
|00000ba0| 72 79 20 2f 70 75 62 2f | 4c 69 6e 75 78 2f 64 65 |ry /pub/|Linux/de|
|00000bb0| 76 65 6c 2f 6c 61 6e 67 | 2f 63 2f 2c 20 6f 72 20 |vel/lang|/c/, or |
|00000bc0| 6f 6e 20 61 6e 79 20 6f | 66 20 74 68 65 20 6d 61 |on any o|f the ma|
|00000bd0| 6e 79 20 73 75 6e 73 69 | 74 65 20 6d 69 72 72 6f |ny sunsi|te mirro|
|00000be0| 72 73 2e 0a 4d 79 20 74 | 68 72 65 65 20 66 61 76 |rs..My t|hree fav|
|00000bf0| 6f 72 69 74 65 73 20 61 | 72 65 20 66 74 70 2e 63 |orites a|re ftp.c|
|00000c00| 63 2e 67 61 74 65 63 68 | 2e 65 64 75 2c 20 66 74 |c.gatech|.edu, ft|
|00000c10| 70 2e 63 64 72 6f 6d 2e | 63 6f 6d 2c 20 61 6e 64 |p.cdrom.|com, and|
|00000c20| 0a 75 69 61 72 63 68 69 | 76 65 2e 63 73 6f 2e 75 |.uiarchi|ve.cso.u|
|00000c30| 69 75 63 2e 65 64 75 2e | 0a 0a 59 6f 75 20 6d 61 |iuc.edu.|..You ma|
|00000c40| 79 20 77 65 6c 6c 20 62 | 65 20 77 6f 6e 64 65 72 |y well b|e wonder|
|00000c50| 69 6e 67 20 77 68 61 74 | 20 74 68 65 20 73 74 61 |ing what| the sta|
|00000c60| 74 75 73 20 6f 66 20 63 | 64 65 63 6c 20 69 73 2e |tus of c|decl is.|
|00000c70| 20 20 53 6f 20 61 6d 20 | 49 2e 20 20 49 74 20 77 | So am |I. It w|
|00000c80| 61 73 0a 74 77 69 63 65 | 20 70 6f 73 74 65 64 20 |as.twice| posted |
|00000c90| 74 6f 20 63 6f 6d 70 2e | 73 6f 75 72 63 65 73 2e |to comp.|sources.|
|00000ca0| 75 6e 69 78 2c 20 62 75 | 74 20 6e 65 69 74 68 65 |unix, bu|t neithe|
|00000cb0| 72 20 65 64 69 74 69 6f | 6e 20 63 61 72 72 69 65 |r editio|n carrie|
|00000cc0| 64 20 61 6e 79 20 6d 65 | 6e 74 69 6f 6e 0a 6f 66 |d any me|ntion.of|
|00000cd0| 20 63 6f 70 79 72 69 67 | 68 74 2e 20 20 54 68 69 | copyrig|ht. Thi|
|00000ce0| 73 20 76 65 72 73 69 6f | 6e 20 69 73 20 64 65 72 |s versio|n is der|
|00000cf0| 69 76 65 64 20 66 72 6f | 6d 20 74 68 65 20 73 65 |ived fro|m the se|
|00000d00| 63 6f 6e 64 20 65 64 69 | 74 69 6f 6e 2e 20 20 49 |cond edi|tion. I|
|00000d10| 20 68 61 76 65 0a 6e 6f | 20 72 65 61 73 6f 6e 20 | have.no| reason |
|00000d20| 74 6f 20 62 65 6c 69 65 | 76 65 20 74 68 65 72 65 |to belie|ve there|
|00000d30| 20 61 72 65 20 61 6e 79 | 20 6c 69 6d 69 74 61 74 | are any| limitat|
|00000d40| 69 6f 6e 73 20 6f 6e 20 | 69 74 73 20 75 73 65 2c |ions on |its use,|
|00000d50| 20 61 6e 64 20 73 74 72 | 6f 6e 67 6c 79 0a 62 65 | and str|ongly.be|
|00000d60| 6c 69 65 76 65 20 69 74 | 20 74 6f 20 62 65 20 69 |lieve it| to be i|
|00000d70| 6e 20 74 68 65 20 50 75 | 62 6c 69 63 20 44 6f 6d |n the Pu|blic Dom|
|00000d80| 61 69 6e 2e 20 20 47 4e | 55 20 72 65 61 64 6c 69 |ain. GN|U readli|
|00000d90| 6e 65 20 69 73 2c 20 6f | 66 20 63 6f 75 72 73 65 |ne is, o|f course|
|00000da0| 2c 0a 63 6f 76 65 72 65 | 64 20 62 79 20 74 68 65 |,.covere|d by the|
|00000db0| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|00000dc0| 6c 69 63 20 4c 69 63 65 | 6e 73 65 2e 0a 0a 49 20 |lic Lice|nse...I |
|00000dd0| 77 61 73 20 69 6e 73 70 | 69 72 65 64 20 74 6f 20 |was insp|ired to |
|00000de0| 70 6f 72 74 20 63 64 65 | 63 6c 20 74 6f 20 4c 69 |port cde|cl to Li|
|00000df0| 6e 75 78 20 61 73 20 74 | 68 65 72 65 20 77 61 73 |nux as t|here was|
|00000e00| 20 6e 6f 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 69 | no vers|ion of i|
|00000e10| 74 0a 61 76 61 69 6c 61 | 62 6c 65 20 69 6e 20 74 |t.availa|ble in t|
|00000e20| 68 65 20 76 61 72 69 6f | 75 73 20 4c 69 6e 75 78 |he vario|us Linux|
|00000e30| 20 73 6f 66 74 77 61 72 | 65 20 61 72 63 68 69 76 | softwar|e archiv|
|00000e40| 65 73 20 74 68 61 74 20 | 49 20 61 6d 20 61 77 61 |es that |I am awa|
|00000e50| 72 65 20 6f 66 2e 0a 54 | 68 65 20 61 64 64 69 74 |re of..T|he addit|
|00000e60| 69 6f 6e 20 6f 66 20 47 | 4e 55 20 72 65 61 64 6c |ion of G|NU readl|
|00000e70| 69 6e 65 20 73 75 70 70 | 6f 72 74 20 73 65 65 6d |ine supp|ort seem|
|00000e80| 65 64 20 6c 69 6b 65 20 | 61 20 6c 6f 67 69 63 61 |ed like |a logica|
|00000e90| 6c 20 65 78 74 65 6e 73 | 69 6f 6e 0a 6f 66 20 74 |l extens|ion.of t|
|00000ea0| 68 65 20 70 72 6f 67 72 | 61 6d 2e 20 20 42 65 20 |he progr|am. Be |
|00000eb0| 77 61 72 6e 65 64 2c 20 | 68 6f 77 65 76 65 72 2c |warned, |however,|
|00000ec0| 20 74 68 61 74 20 6c 69 | 6e 6b 69 6e 67 20 77 69 | that li|nking wi|
|00000ed0| 74 68 20 72 65 61 64 6c | 69 6e 65 20 6d 6f 72 65 |th readl|ine more|
|00000ee0| 0a 74 68 61 6e 20 64 6f | 75 62 6c 65 73 20 74 68 |.than do|ubles th|
|00000ef0| 65 20 73 69 7a 65 20 6f | 66 20 74 68 65 20 70 72 |e size o|f the pr|
|00000f00| 6f 67 72 61 6d 2e 20 20 | 54 68 6f 73 65 20 77 68 |ogram. |Those wh|
|00000f10| 6f 73 65 20 6d 61 69 6e | 20 63 6f 6e 63 65 72 6e |ose main| concern|
|00000f20| 20 69 73 0a 73 70 61 63 | 65 20 6d 69 67 68 74 20 | is.spac|e might |
|00000f30| 77 69 73 68 20 74 6f 20 | 62 75 69 6c 64 20 61 20 |wish to |build a |
|00000f40| 76 65 72 73 69 6f 6e 20 | 77 69 74 68 6f 75 74 20 |version |without |
|00000f50| 72 65 61 64 6c 69 6e 65 | 2e 0a 0a 44 61 76 69 64 |readline|...David|
|00000f60| 20 52 2e 20 43 6f 6e 72 | 61 64 0a 63 6f 6e 72 61 | R. Conr|ad.conra|
|00000f70| 64 40 64 65 74 72 6f 69 | 74 2e 66 72 65 65 6e 65 |d@detroi|t.freene|
|00000f80| 74 2e 6f 72 67 0a 44 65 | 74 72 6f 69 74 2c 20 4d |t.org.De|troit, M|
|00000f90| 69 63 68 69 67 61 6e 2c | 20 55 53 41 0a 31 36 20 |ichigan,| USA.16 |
|00000fa0| 4a 61 6e 75 61 72 79 20 | 31 39 39 36 0a 0a 00 00 |January |1996....|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 63 64 65 63 6c 2d 32 2e | 35 2f 4d 61 6b 65 66 69 |cdecl-2.|5/Makefi|
|00001010| 6c 65 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |le......|........|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 20 37 |....1006|44 . 7|
|00001070| 36 37 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |67 . 1|44 . |
|00001080| 20 20 20 33 32 36 32 20 | 20 36 30 37 36 36 33 34 | 3262 | 6076634|
|00001090| 35 34 36 20 20 31 32 32 | 37 34 00 20 30 00 00 00 |546 122|74. 0...|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 75 73 74 61 72 20 20 | 00 64 72 63 00 00 00 00 |.ustar |.drc....|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 23 20 40 28 23 29 6d 61 | 6b 65 66 69 6c 65 09 32 |# @(#)ma|kefile.2|
|00001210| 2e 33 20 31 2f 31 36 2f | 39 36 0a 23 20 74 68 65 |.3 1/16/|96.# the|
|00001220| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 61 6e 20 62 | followi|ng can b|
|00001230| 65 20 61 64 64 65 64 20 | 74 6f 20 43 46 4c 41 47 |e added |to CFLAG|
|00001240| 53 20 66 6f 72 20 76 61 | 72 69 6f 75 73 20 74 68 |S for va|rious th|
|00001250| 69 6e 67 73 0a 23 0a 23 | 20 61 64 64 20 2d 44 4e |ings.#.#| add -DN|
|00001260| 4f 56 4f 49 44 09 09 49 | 66 20 79 6f 75 72 20 63 |OVOID..I|f your c|
|00001270| 6f 6d 70 69 6c 65 72 20 | 63 61 6e 20 6e 6f 74 20 |ompiler |can not |
|00001280| 68 61 6e 64 6c 65 20 74 | 68 65 20 76 6f 69 64 20 |handle t|he void |
|00001290| 6b 65 79 77 6f 72 64 2e | 0a 23 20 61 64 64 20 2d |keyword.|.# add -|
|000012a0| 44 42 53 44 09 09 46 6f | 72 20 42 53 44 34 2e 5b |DBSD..Fo|r BSD4.[|
|000012b0| 32 33 5d 20 55 4e 49 58 | 20 53 79 73 74 65 6d 73 |23] UNIX| Systems|
|000012c0| 2e 0a 23 20 61 64 64 20 | 2d 44 44 4f 53 09 09 46 |..# add |-DDOS..F|
|000012d0| 6f 72 20 4d 53 2d 44 4f | 53 2f 50 43 2d 44 4f 53 |or MS-DO|S/PC-DOS|
|000012e0| 20 53 79 73 74 65 6d 73 | 2c 20 4d 69 63 72 6f 2d | Systems|, Micro-|
|000012f0| 53 6f 66 74 20 43 20 34 | 2e 30 2c 20 54 75 72 62 |Soft C 4|.0, Turb|
|00001300| 6f 20 43 0a 23 09 09 09 | 09 55 73 65 20 74 68 65 |o C.#...|.Use the|
|00001310| 20 41 4e 53 49 20 6f 70 | 74 69 6f 6e 2e 0a 23 20 | ANSI op|tion..# |
|00001320| 61 64 64 20 2d 44 4e 4f | 47 45 54 4f 50 54 09 49 |add -DNO|GETOPT.I|
|00001330| 66 20 79 6f 75 72 20 6c | 69 62 72 61 72 79 20 64 |f your l|ibrary d|
|00001340| 6f 65 73 6e 27 74 20 68 | 61 76 65 20 67 65 74 6f |oesn't h|ave geto|
|00001350| 70 74 28 29 2e 0a 23 09 | 09 09 09 41 6e 6f 74 68 |pt()..#.|...Anoth|
|00001360| 65 72 20 72 6f 75 74 69 | 6e 65 20 77 69 6c 6c 20 |er routi|ne will |
|00001370| 62 65 20 75 73 65 64 20 | 69 6e 20 69 74 73 20 70 |be used |in its p|
|00001380| 6c 61 63 65 2e 0a 23 20 | 61 64 64 20 2d 44 4e 4f |lace..# |add -DNO|
|00001390| 56 41 52 41 52 47 53 09 | 49 66 20 79 6f 75 20 68 |VARARGS.|If you h|
|000013a0| 61 76 65 20 6e 65 69 74 | 68 65 72 20 3c 73 74 64 |ave neit|her <std|
|000013b0| 61 72 67 2e 68 3e 20 28 | 41 4e 53 49 20 43 29 20 |arg.h> (|ANSI C) |
|000013c0| 6f 72 0a 23 09 09 09 09 | 3c 76 61 72 61 72 67 73 |or.#....|<varargs|
|000013d0| 2e 68 3e 20 28 70 72 65 | 2d 41 4e 53 49 20 43 29 |.h> (pre|-ANSI C)|
|000013e0| 2e 0a 23 09 09 09 09 41 | 6e 6f 74 68 65 72 20 6d |..#....A|nother m|
|000013f0| 65 74 68 6f 64 20 77 69 | 6c 6c 20 62 65 20 63 6f |ethod wi|ll be co|
|00001400| 6d 70 69 6c 65 64 20 69 | 6e 73 74 65 61 64 2e 0a |mpiled i|nstead..|
|00001410| 23 20 61 64 64 20 2d 44 | 64 6f 64 65 62 75 67 09 |# add -D|dodebug.|
|00001420| 09 54 6f 20 63 6f 6d 70 | 69 6c 65 20 69 6e 20 64 |.To comp|ile in d|
|00001430| 65 62 75 67 67 69 6e 67 | 20 74 72 61 63 65 20 73 |ebugging| trace s|
|00001440| 74 61 74 65 6d 65 6e 74 | 73 2e 0a 23 20 61 64 64 |tatement|s..# add|
|00001450| 20 2d 44 64 6f 79 79 64 | 65 62 75 67 09 54 6f 20 | -Ddoyyd|ebug.To |
|00001460| 63 6f 6d 70 69 6c 65 20 | 69 6e 20 79 61 63 63 20 |compile |in yacc |
|00001470| 74 72 61 63 65 20 73 74 | 61 74 65 6d 65 6e 74 73 |trace st|atements|
|00001480| 2e 0a 23 0a 23 20 61 64 | 64 20 2d 44 55 53 45 5f |..#.# ad|d -DUSE_|
|00001490| 52 45 41 44 4c 49 4e 45 | 09 54 6f 20 63 6f 6d 70 |READLINE|.To comp|
|000014a0| 69 6c 65 20 69 6e 20 73 | 75 70 70 6f 72 74 20 66 |ile in s|upport f|
|000014b0| 6f 72 20 74 68 65 20 47 | 4e 55 20 72 65 61 64 6c |or the G|NU readl|
|000014c0| 69 6e 65 20 6c 69 62 72 | 61 72 79 2e 0a 0a 43 46 |ine libr|ary...CF|
|000014d0| 4c 41 47 53 3d 20 2d 73 | 20 2d 4f 32 20 2d 44 55 |LAGS= -s| -O2 -DU|
|000014e0| 53 45 5f 52 45 41 44 4c | 49 4e 45 0a 43 43 3d 20 |SE_READL|INE.CC= |
|000014f0| 67 63 63 0a 4c 49 42 53 | 3d 20 2d 6c 72 65 61 64 |gcc.LIBS|= -lread|
|00001500| 6c 69 6e 65 20 2d 6c 74 | 65 72 6d 63 61 70 0a 41 |line -lt|ermcap.A|
|00001510| 4c 4c 46 49 4c 45 53 3d | 20 6d 61 6b 65 66 69 6c |LLFILES=| makefil|
|00001520| 65 20 63 64 67 72 61 6d | 2e 79 20 63 64 6c 65 78 |e cdgram|.y cdlex|
|00001530| 2e 6c 20 63 64 65 63 6c | 2e 63 20 63 64 65 63 6c |.l cdecl|.c cdecl|
|00001540| 2e 31 20 74 65 73 74 73 | 65 74 20 74 65 73 74 73 |.1 tests|et tests|
|00001550| 65 74 2b 2b 0a 42 49 4e | 44 49 52 3d 20 2f 75 73 |et++.BIN|DIR= /us|
|00001560| 72 2f 62 69 6e 0a 4d 41 | 4e 44 49 52 3d 20 2f 75 |r/bin.MA|NDIR= /u|
|00001570| 73 72 2f 6d 61 6e 2f 6d | 61 6e 31 0a 43 41 54 44 |sr/man/m|an1.CATD|
|00001580| 49 52 3d 20 2f 75 73 72 | 2f 6d 61 6e 2f 63 61 74 |IR= /usr|/man/cat|
|00001590| 31 0a 49 4e 53 54 41 4c | 4c 3d 20 69 6e 73 74 61 |1.INSTAL|L= insta|
|000015a0| 6c 6c 20 2d 63 0a 49 4e | 53 54 41 4c 4c 5f 44 41 |ll -c.IN|STALL_DA|
|000015b0| 54 41 3d 20 69 6e 73 74 | 61 6c 6c 20 2d 63 20 2d |TA= inst|all -c -|
|000015c0| 6d 20 36 34 34 0a 0a 63 | 64 65 63 6c 3a 20 63 2b |m 644..c|decl: c+|
|000015d0| 2b 64 65 63 6c 0a 09 6c | 6e 20 63 2b 2b 64 65 63 |+decl..l|n c++dec|
|000015e0| 6c 20 63 64 65 63 6c 0a | 0a 63 2b 2b 64 65 63 6c |l cdecl.|.c++decl|
|000015f0| 3a 20 63 64 67 72 61 6d | 2e 63 20 63 64 6c 65 78 |: cdgram|.c cdlex|
|00001600| 2e 63 20 63 64 65 63 6c | 2e 63 0a 09 24 28 43 43 |.c cdecl|.c..$(CC|
|00001610| 29 20 24 28 43 46 4c 41 | 47 53 29 20 2d 6f 20 63 |) $(CFLA|GS) -o c|
|00001620| 2b 2b 64 65 63 6c 20 63 | 64 65 63 6c 2e 63 20 24 |++decl c|decl.c $|
|00001630| 28 4c 49 42 53 29 0a 09 | 72 6d 20 2d 66 20 63 64 |(LIBS)..|rm -f cd|
|00001640| 65 63 6c 0a 0a 63 64 6c | 65 78 2e 63 3a 20 63 64 |ecl..cdl|ex.c: cd|
|00001650| 6c 65 78 2e 6c 0a 09 6c | 65 78 20 63 64 6c 65 78 |lex.l..l|ex cdlex|
|00001660| 2e 6c 20 26 26 20 6d 76 | 20 6c 65 78 2e 79 79 2e |.l && mv| lex.yy.|
|00001670| 63 20 63 64 6c 65 78 2e | 63 0a 0a 63 64 67 72 61 |c cdlex.|c..cdgra|
|00001680| 6d 2e 63 3a 20 63 64 67 | 72 61 6d 2e 79 0a 09 79 |m.c: cdg|ram.y..y|
|00001690| 61 63 63 20 63 64 67 72 | 61 6d 2e 79 20 26 26 20 |acc cdgr|am.y && |
|000016a0| 6d 76 20 79 2e 74 61 62 | 2e 63 20 63 64 67 72 61 |mv y.tab|.c cdgra|
|000016b0| 6d 2e 63 0a 0a 74 65 73 | 74 3a 0a 09 2e 2f 63 64 |m.c..tes|t:.../cd|
|000016c0| 65 63 6c 20 3c 20 74 65 | 73 74 73 65 74 0a 09 2e |ecl < te|stset...|
|000016d0| 2f 63 2b 2b 64 65 63 6c | 20 3c 20 74 65 73 74 73 |/c++decl| < tests|
|000016e0| 65 74 2b 2b 0a 0a 69 6e | 73 74 61 6c 6c 3a 20 63 |et++..in|stall: c|
|000016f0| 64 65 63 6c 0a 09 24 28 | 49 4e 53 54 41 4c 4c 29 |decl..$(|INSTALL)|
|00001700| 20 63 64 65 63 6c 20 24 | 28 42 49 4e 44 49 52 29 | cdecl $|(BINDIR)|
|00001710| 0a 09 6c 6e 20 24 28 42 | 49 4e 44 49 52 29 2f 63 |..ln $(B|INDIR)/c|
|00001720| 64 65 63 6c 20 24 28 42 | 49 4e 44 49 52 29 2f 63 |decl $(B|INDIR)/c|
|00001730| 2b 2b 64 65 63 6c 0a 09 | 24 28 49 4e 53 54 41 4c |++decl..|$(INSTAL|
|00001740| 4c 5f 44 41 54 41 29 20 | 63 64 65 63 6c 2e 31 20 |L_DATA) |cdecl.1 |
|00001750| 24 28 4d 41 4e 44 49 52 | 29 0a 09 24 28 49 4e 53 |$(MANDIR|)..$(INS|
|00001760| 54 41 4c 4c 5f 44 41 54 | 41 29 20 63 2b 2b 64 65 |TALL_DAT|A) c++de|
|00001770| 63 6c 2e 31 20 24 28 4d | 41 4e 44 49 52 29 0a 0a |cl.1 $(M|ANDIR)..|
|00001780| 63 6c 65 61 6e 3a 0a 09 | 72 6d 20 2d 66 20 63 64 |clean:..|rm -f cd|
|00001790| 67 72 61 6d 2e 63 20 63 | 64 6c 65 78 2e 63 20 63 |gram.c c|dlex.c c|
|000017a0| 64 65 63 6c 20 79 2e 6f | 75 74 70 75 74 20 63 2b |decl y.o|utput c+|
|000017b0| 2b 64 65 63 6c 0a 0a 63 | 6c 6f 62 62 65 72 3a 20 |+decl..c|lobber: |
|000017c0| 63 6c 65 61 6e 0a 09 72 | 6d 20 2d 66 20 24 28 42 |clean..r|m -f $(B|
|000017d0| 49 4e 44 49 52 29 2f 63 | 64 65 63 6c 20 24 28 42 |INDIR)/c|decl $(B|
|000017e0| 49 4e 44 49 52 29 2f 63 | 2b 2b 64 65 63 6c 0a 09 |INDIR)/c|++decl..|
|000017f0| 72 6d 20 2d 66 20 24 28 | 4d 41 4e 44 49 52 29 2f |rm -f $(|MANDIR)/|
|00001800| 63 64 65 63 6c 2e 31 20 | 24 28 4d 41 4e 44 49 52 |cdecl.1 |$(MANDIR|
|00001810| 29 2f 63 2b 2b 64 65 63 | 6c 2e 31 0a 09 72 6d 20 |)/c++dec|l.1..rm |
|00001820| 2d 66 20 24 28 43 41 54 | 44 49 52 29 2f 63 64 65 |-f $(CAT|DIR)/cde|
|00001830| 63 6c 2e 31 2e 67 7a 0a | 0a 63 64 65 63 6c 2e 63 |cl.1.gz.|.cdecl.c|
|00001840| 70 69 6f 3a 20 24 28 41 | 4c 4c 46 49 4c 45 53 29 |pio: $(A|LLFILES)|
|00001850| 0a 09 6c 73 20 24 28 41 | 4c 4c 46 49 4c 45 53 29 |..ls $(A|LLFILES)|
|00001860| 20 7c 20 63 70 69 6f 20 | 2d 6f 63 76 20 3e 20 63 | | cpio |-ocv > c|
|00001870| 64 65 63 6c 2e 63 70 69 | 6f 0a 0a 63 64 65 63 6c |decl.cpi|o..cdecl|
|00001880| 2e 73 68 61 72 3a 20 24 | 28 41 4c 4c 46 49 4c 45 |.shar: $|(ALLFILE|
|00001890| 53 29 0a 09 73 68 61 72 | 20 24 28 41 4c 4c 46 49 |S)..shar| $(ALLFI|
|000018a0| 4c 45 53 29 20 3e 20 63 | 64 65 63 6c 2e 73 68 61 |LES) > c|decl.sha|
|000018b0| 72 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |r.......|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 63 64 65 63 6c 2d 32 2e | 35 2f 63 64 65 63 6c 2e |cdecl-2.|5/cdecl.|
|00001a10| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 20 37 |....1006|44 . 7|
|00001a70| 36 37 20 00 20 20 20 31 | 34 34 20 00 20 20 20 20 |67 . 1|44 . |
|00001a80| 20 20 37 37 33 34 33 20 | 20 36 30 37 36 36 32 30 | 77343 | 6076620|
|00001a90| 36 30 36 20 20 31 32 30 | 37 35 00 20 30 00 00 00 |606 120|75. 0...|
|00001aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b00| 00 75 73 74 61 72 20 20 | 00 64 72 63 00 00 00 00 |.ustar |.drc....|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 2f 2a 0a 20 2a 20 63 64 | 65 63 6c 20 2d 20 41 4e |/*. * cd|ecl - AN|
|00001c10| 53 49 20 43 20 61 6e 64 | 20 43 2b 2b 20 64 65 63 |SI C and| C++ dec|
|00001c20| 6c 61 72 61 74 69 6f 6e | 20 63 6f 6d 70 6f 73 65 |laration| compose|
|00001c30| 72 20 26 20 64 65 63 6f | 64 65 72 0a 20 2a 0a 20 |r & deco|der. *. |
|00001c40| 2a 09 6f 72 69 67 69 6e | 61 6c 6c 79 20 77 72 69 |*.origin|ally wri|
|00001c50| 74 74 65 6e 0a 20 2a 09 | 09 47 72 61 68 61 6d 20 |tten. *.|.Graham |
|00001c60| 52 6f 73 73 0a 20 2a 09 | 09 6f 6e 63 65 20 61 74 |Ross. *.|.once at|
|00001c70| 20 74 65 6b 74 72 6f 6e | 69 78 21 74 65 6b 6d 64 | tektron|ix!tekmd|
|00001c80| 70 21 67 72 61 68 61 6d | 72 0a 20 2a 09 09 6e 6f |p!graham|r. *..no|
|00001c90| 77 20 61 74 20 43 6f 6e | 74 65 78 74 2c 20 49 6e |w at Con|text, In|
|00001ca0| 63 2e 0a 20 2a 0a 20 2a | 09 6d 6f 64 69 66 69 65 |c.. *. *|.modifie|
|00001cb0| 64 20 74 6f 20 70 72 6f | 76 69 64 65 20 68 69 6e |d to pro|vide hin|
|00001cc0| 74 73 20 66 6f 72 20 75 | 6e 73 75 70 70 6f 72 74 |ts for u|nsupport|
|00001cd0| 65 64 20 74 79 70 65 73 | 0a 20 2a 09 61 64 64 65 |ed types|. *.adde|
|00001ce0| 64 20 61 72 67 75 6d 65 | 6e 74 20 6c 69 73 74 73 |d argume|nt lists|
|00001cf0| 20 66 6f 72 20 66 75 6e | 63 74 69 6f 6e 73 0a 20 | for fun|ctions. |
|00001d00| 2a 09 61 64 64 65 64 20 | 27 65 78 70 6c 61 69 6e |*.added |'explain|
|00001d10| 20 63 61 73 74 27 20 67 | 72 61 6d 6d 61 72 0a 20 | cast' g|rammar. |
|00001d20| 2a 09 61 64 64 65 64 20 | 23 69 66 64 65 66 20 66 |*.added |#ifdef f|
|00001d30| 6f 72 20 27 63 72 65 61 | 74 65 20 70 72 6f 67 72 |or 'crea|te progr|
|00001d40| 61 6d 27 20 66 65 61 74 | 75 72 65 0a 20 2a 09 09 |am' feat|ure. *..|
|00001d50| 3f 3f 3f 3f 20 28 73 6f | 72 72 79 2c 20 49 20 6c |???? (so|rry, I l|
|00001d60| 6f 73 74 20 79 6f 75 72 | 20 6e 61 6d 65 20 61 6e |ost your| name an|
|00001d70| 64 20 6c 6f 67 69 6e 29 | 0a 20 2a 0a 20 2a 09 63 |d login)|. *. *.c|
|00001d80| 6f 6e 76 65 72 73 69 6f | 6e 20 74 6f 20 41 4e 53 |onversio|n to ANS|
|00001d90| 49 20 43 0a 20 2a 09 09 | 44 61 76 69 64 20 57 6f |I C. *..|David Wo|
|00001da0| 6c 76 65 72 74 6f 6e 0a | 20 2a 09 09 69 68 6e 70 |lverton.| *..ihnp|
|00001db0| 34 21 68 6f 75 78 73 21 | 64 61 77 0a 20 2a 0a 20 |4!houxs!|daw. *. |
|00001dc0| 2a 09 6d 65 72 67 65 64 | 20 44 2e 20 57 6f 6c 76 |*.merged| D. Wolv|
|00001dd0| 65 72 74 6f 6e 27 73 20 | 41 4e 53 49 20 43 20 76 |erton's |ANSI C v|
|00001de0| 65 72 73 69 6f 6e 20 77 | 2f 20 3f 3f 3f 3f 27 73 |ersion w|/ ????'s|
|00001df0| 20 76 65 72 73 69 6f 6e | 0a 20 2a 09 61 64 64 65 | version|. *.adde|
|00001e00| 64 20 66 75 6e 63 74 69 | 6f 6e 20 70 72 6f 74 6f |d functi|on proto|
|00001e10| 74 79 70 65 73 0a 20 2a | 09 61 64 64 65 64 20 43 |types. *|.added C|
|00001e20| 2b 2b 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 0a |++ decla|rations.|
|00001e30| 20 2a 09 6d 61 64 65 20 | 74 79 70 65 20 63 6f 6d | *.made |type com|
|00001e40| 62 69 6e 61 74 69 6f 6e | 20 63 68 65 63 6b 69 6e |bination| checkin|
|00001e50| 67 20 74 61 62 6c 65 20 | 64 72 69 76 65 6e 0a 20 |g table |driven. |
|00001e60| 2a 09 61 64 64 65 64 20 | 63 68 65 63 6b 73 20 66 |*.added |checks f|
|00001e70| 6f 72 20 76 6f 69 64 20 | 76 61 72 69 61 62 6c 65 |or void |variable|
|00001e80| 20 63 6f 6d 62 69 6e 61 | 74 69 6f 6e 73 0a 20 2a | combina|tions. *|
|00001e90| 09 6d 61 64 65 20 27 63 | 72 65 61 74 65 20 70 72 |.made 'c|reate pr|
|00001ea0| 6f 67 72 61 6d 27 20 66 | 65 61 74 75 72 65 20 61 |ogram' f|eature a|
|00001eb0| 20 72 75 6e 74 69 6d 65 | 20 6f 70 74 69 6f 6e 0a | runtime| option.|
|00001ec0| 20 2a 09 61 64 64 65 64 | 20 66 69 6c 65 20 70 61 | *.added| file pa|
|00001ed0| 72 73 69 6e 67 20 61 73 | 20 77 65 6c 6c 20 61 73 |rsing as| well as|
|00001ee0| 20 6a 75 73 74 20 73 74 | 64 69 6e 0a 20 2a 09 61 | just st|din. *.a|
|00001ef0| 64 64 65 64 20 68 65 6c | 70 20 6d 65 73 73 61 67 |dded hel|p messag|
|00001f00| 65 20 61 74 20 62 65 67 | 69 6e 6e 69 6e 67 0a 20 |e at beg|inning. |
|00001f10| 2a 09 61 64 64 65 64 20 | 70 72 6f 6d 70 74 73 20 |*.added |prompts |
|00001f20| 77 68 65 6e 20 6f 6e 20 | 61 20 54 54 59 20 6f 72 |when on |a TTY or|
|00001f30| 20 69 6e 20 69 6e 74 65 | 72 61 63 74 69 76 65 20 | in inte|ractive |
|00001f40| 6d 6f 64 65 0a 20 2a 09 | 61 64 64 65 64 20 67 65 |mode. *.|added ge|
|00001f50| 74 6f 70 74 28 29 20 75 | 73 61 67 65 0a 20 2a 09 |topt() u|sage. *.|
|00001f60| 61 64 64 65 64 20 2d 61 | 2c 20 2d 72 2c 20 2d 70 |added -a|, -r, -p|
|00001f70| 2c 20 2d 63 2c 20 2d 64 | 2c 20 2d 44 2c 20 2d 56 |, -c, -d|, -D, -V|
|00001f80| 2c 20 2d 69 20 61 6e 64 | 20 2d 2b 20 6f 70 74 69 |, -i and| -+ opti|
|00001f90| 6f 6e 73 0a 20 2a 09 64 | 65 6c 69 6e 74 65 64 0a |ons. *.d|elinted.|
|00001fa0| 20 2a 09 61 64 64 65 64 | 20 23 64 65 66 69 6e 65 | *.added| #define|
|00001fb0| 73 20 66 6f 72 20 74 68 | 6f 73 65 20 77 69 74 68 |s for th|ose with|
|00001fc0| 6f 75 74 20 67 65 74 6f | 70 74 20 6f 72 20 76 6f |out geto|pt or vo|
|00001fd0| 69 64 0a 20 2a 09 61 64 | 64 65 64 20 27 73 65 74 |id. *.ad|ded 'set|
|00001fe0| 20 6f 70 74 69 6f 6e 73 | 27 20 63 6f 6d 6d 61 6e | options|' comman|
|00001ff0| 64 0a 20 2a 09 61 64 64 | 65 64 20 27 71 75 69 74 |d. *.add|ed 'quit|
|00002000| 2f 65 78 69 74 27 20 63 | 6f 6d 6d 61 6e 64 0a 20 |/exit' c|ommand. |
|00002010| 2a 09 61 64 64 65 64 20 | 73 79 6e 6f 6e 79 6d 73 |*.added |synonyms|
|00002020| 0a 20 2a 09 09 54 6f 6e | 79 20 48 61 6e 73 65 6e |. *..Ton|y Hansen|
|00002030| 0a 20 2a 09 09 61 74 74 | 6d 61 69 6c 21 74 6f 6e |. *..att|mail!ton|
|00002040| 79 2c 20 69 68 6e 70 34 | 21 70 65 67 61 73 75 73 |y, ihnp4|!pegasus|
|00002050| 21 68 61 6e 73 65 6e 0a | 20 2a 0a 20 2a 09 61 64 |!hansen.| *. *.ad|
|00002060| 64 65 64 20 65 78 74 65 | 72 6e 2c 20 72 65 67 69 |ded exte|rn, regi|
|00002070| 73 74 65 72 2c 20 73 74 | 61 74 69 63 0a 20 2a 09 |ster, st|atic. *.|
|00002080| 61 64 64 65 64 20 6c 69 | 6e 6b 73 20 74 6f 20 65 |added li|nks to e|
|00002090| 78 70 6c 61 69 6e 2c 20 | 63 61 73 74 2c 20 64 65 |xplain, |cast, de|
|000020a0| 63 6c 61 72 65 0a 20 2a | 09 73 65 70 61 72 61 74 |clare. *|.separat|
|000020b0| 65 6c 79 20 64 65 76 65 | 6c 6f 70 65 64 20 41 4e |ely deve|loped AN|
|000020c0| 53 49 20 43 20 73 75 70 | 70 6f 72 74 0a 20 2a 09 |SI C sup|port. *.|
|000020d0| 09 4d 65 72 6c 79 6e 20 | 4c 65 52 6f 79 0a 20 2a |.Merlyn |LeRoy. *|
|000020e0| 09 09 6d 65 72 6c 79 6e | 40 72 6f 73 65 33 2e 72 |..merlyn|@rose3.r|
|000020f0| 6f 73 65 6d 6f 75 6e 74 | 2e 63 6f 6d 0a 20 2a 0a |osemount|.com. *.|
|00002100| 20 2a 09 6d 65 72 67 65 | 64 20 76 65 72 73 69 6f | *.merge|d versio|
|00002110| 6e 73 20 66 72 6f 6d 20 | 4c 65 52 6f 79 0a 20 2a |ns from |LeRoy. *|
|00002120| 09 61 64 64 65 64 20 74 | 6d 70 66 69 6c 65 28 29 |.added t|mpfile()|
|00002130| 20 73 75 70 70 6f 72 74 | 0a 20 2a 09 61 6c 6c 6f | support|. *.allo|
|00002140| 77 20 6d 6f 72 65 20 70 | 61 72 74 73 20 74 6f 20 |w more p|arts to |
|00002150| 62 65 20 6d 69 73 73 69 | 6e 67 20 64 75 72 69 6e |be missi|ng durin|
|00002160| 67 20 65 78 70 6c 61 6e | 61 74 69 6f 6e 73 0a 20 |g explan|ations. |
|00002170| 2a 09 09 54 6f 6e 79 20 | 48 61 6e 73 65 6e 0a 20 |*..Tony |Hansen. |
|00002180| 2a 09 09 61 74 74 6d 61 | 69 6c 21 74 6f 6e 79 2c |*..attma|il!tony,|
|00002190| 20 69 68 6e 70 34 21 70 | 65 67 61 73 75 73 21 68 | ihnp4!p|egasus!h|
|000021a0| 61 6e 73 65 6e 0a 20 2a | 0a 20 2a 09 61 64 64 65 |ansen. *|. *.adde|
|000021b0| 64 20 47 4e 55 20 72 65 | 61 64 6c 69 6e 65 28 29 |d GNU re|adline()|
|000021c0| 20 73 75 70 70 6f 72 74 | 0a 20 2a 09 61 64 64 65 | support|. *.adde|
|000021d0| 64 20 64 6f 74 6d 70 66 | 69 6c 65 5f 66 72 6f 6d |d dotmpf|ile_from|
|000021e0| 5f 73 74 72 69 6e 67 28 | 29 20 74 6f 20 73 75 70 |_string(|) to sup|
|000021f0| 70 6f 72 74 20 72 65 61 | 64 6c 69 6e 65 28 29 0a |port rea|dline().|
|00002200| 20 2a 09 6f 75 74 64 65 | 6e 74 65 64 20 43 20 68 | *.outde|nted C h|
|00002210| 65 6c 70 20 74 65 78 74 | 20 74 6f 20 70 72 65 76 |elp text| to prev|
|00002220| 65 6e 74 20 6c 69 6e 65 | 20 66 72 6f 6d 20 77 72 |ent line| from wr|
|00002230| 61 70 70 69 6e 67 0a 20 | 2a 09 6d 69 6e 6f 72 20 |apping. |*.minor |
|00002240| 74 77 65 61 6b 69 6e 67 | 20 6f 66 20 6d 61 6b 65 |tweaking| of make|
|00002250| 66 69 6c 65 20 26 26 20 | 6d 76 20 6d 61 6b 65 66 |file && |mv makef|
|00002260| 69 6c 65 20 4d 61 6b 65 | 66 69 6c 65 0a 20 2a 09 |ile Make|file. *.|
|00002270| 74 6f 6f 6b 20 6f 75 74 | 20 69 6e 74 65 72 61 63 |took out| interac|
|00002280| 74 69 76 65 20 61 6e 64 | 20 6e 6f 69 6e 74 65 72 |tive and| nointer|
|00002290| 61 63 74 69 76 65 20 63 | 6f 6d 6d 61 6e 64 73 20 |active c|ommands |
|000022a0| 77 68 65 6e 0a 20 2a 09 | 20 20 20 20 63 6f 6d 70 |when. *.| comp|
|000022b0| 69 6c 65 64 20 77 69 74 | 68 20 72 65 61 64 6c 69 |iled wit|h readli|
|000022c0| 6e 65 20 73 75 70 70 6f | 72 74 0a 20 2a 09 61 64 |ne suppo|rt. *.ad|
|000022d0| 64 65 64 20 70 72 6f 6d | 70 74 20 61 6e 64 20 6e |ded prom|pt and n|
|000022e0| 6f 70 72 6f 6d 70 74 20 | 63 6f 6d 6d 61 6e 64 73 |oprompt |commands|
|000022f0| 2c 20 2d 71 20 6f 70 74 | 69 6f 6e 0a 20 2a 09 09 |, -q opt|ion. *..|
|00002300| 44 61 76 65 20 43 6f 6e | 72 61 64 0a 20 2a 09 09 |Dave Con|rad. *..|
|00002310| 63 6f 6e 72 61 64 40 64 | 65 74 72 6f 69 74 2e 66 |conrad@d|etroit.f|
|00002320| 72 65 65 6e 65 74 2e 6f | 72 67 0a 20 2a 2f 0a 0a |reenet.o|rg. */..|
|00002330| 63 68 61 72 20 63 64 65 | 63 6c 73 63 63 73 69 64 |char cde|clsccsid|
|00002340| 5b 5d 20 3d 20 22 40 28 | 23 29 63 64 65 63 6c 2e |[] = "@(|#)cdecl.|
|00002350| 63 09 32 2e 35 20 31 2f | 31 35 2f 39 36 22 3b 0a |c.2.5 1/|15/96";.|
|00002360| 0c 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 64 69 |..#inclu|de <stdi|
|00002370| 6f 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 63 |o.h>.#in|clude <c|
|00002380| 74 79 70 65 2e 68 3e 0a | 23 69 66 20 5f 5f 53 54 |type.h>.|#if __ST|
|00002390| 44 43 5f 5f 20 7c 7c 20 | 64 65 66 69 6e 65 64 28 |DC__ || |defined(|
|000023a0| 44 4f 53 29 0a 23 20 69 | 6e 63 6c 75 64 65 20 3c |DOS).# i|nclude <|
|000023b0| 73 74 64 6c 69 62 2e 68 | 3e 0a 23 20 69 6e 63 6c |stdlib.h|>.# incl|
|000023c0| 75 64 65 20 3c 73 74 64 | 64 65 66 2e 68 3e 0a 23 |ude <std|def.h>.#|
|000023d0| 20 69 6e 63 6c 75 64 65 | 20 3c 73 74 72 69 6e 67 | include| <string|
|000023e0| 2e 68 3e 0a 23 20 69 6e | 63 6c 75 64 65 20 3c 73 |.h>.# in|clude <s|
|000023f0| 74 64 61 72 67 2e 68 3e | 0a 23 65 6c 73 65 0a 23 |tdarg.h>|.#else.#|
|00002400| 20 69 66 6e 64 65 66 20 | 4e 4f 56 41 52 41 52 47 | ifndef |NOVARARG|
|00002410| 53 0a 23 20 20 69 6e 63 | 6c 75 64 65 20 3c 76 61 |S.# inc|lude <va|
|00002420| 72 61 72 67 73 2e 68 3e | 0a 23 20 65 6e 64 69 66 |rargs.h>|.# endif|
|00002430| 20 2f 2a 20 6e 64 65 66 | 20 4e 4f 56 41 52 41 52 | /* ndef| NOVARAR|
|00002440| 47 53 20 2a 2f 0a 63 68 | 61 72 20 2a 6d 61 6c 6c |GS */.ch|ar *mall|
|00002450| 6f 63 28 29 3b 0a 76 6f | 69 64 20 66 72 65 65 28 |oc();.vo|id free(|
|00002460| 29 2c 20 65 78 69 74 28 | 29 2c 20 70 65 72 72 6f |), exit(|), perro|
|00002470| 72 28 29 3b 0a 23 20 69 | 66 64 65 66 20 42 53 44 |r();.# i|fdef BSD|
|00002480| 0a 23 20 20 69 6e 63 6c | 75 64 65 20 3c 73 74 72 |.# incl|ude <str|
|00002490| 69 6e 67 73 2e 68 3e 0a | 20 20 20 65 78 74 65 72 |ings.h>.| exter|
|000024a0| 6e 20 69 6e 74 20 65 72 | 72 6e 6f 3b 0a 23 20 20 |n int er|rno;.# |
|000024b0| 64 65 66 69 6e 65 20 73 | 74 72 72 63 68 72 20 72 |define s|trrchr r|
|000024c0| 69 6e 64 65 78 0a 23 20 | 20 64 65 66 69 6e 65 20 |index.# | define |
|000024d0| 4e 4f 54 4d 50 46 49 4c | 45 0a 23 20 65 6c 73 65 |NOTMPFIL|E.# else|
|000024e0| 0a 23 20 20 69 6e 63 6c | 75 64 65 20 3c 73 74 72 |.# incl|ude <str|
|000024f0| 69 6e 67 2e 68 3e 0a 23 | 20 20 69 6e 63 6c 75 64 |ing.h>.#| includ|
|00002500| 65 20 3c 65 72 72 6e 6f | 2e 68 3e 0a 23 20 65 6e |e <errno|.h>.# en|
|00002510| 64 69 66 20 2f 2a 20 42 | 53 44 20 2a 2f 0a 23 20 |dif /* B|SD */.# |
|00002520| 69 66 64 65 66 20 4e 4f | 56 4f 49 44 0a 23 20 20 |ifdef NO|VOID.# |
|00002530| 64 65 66 69 6e 65 20 76 | 6f 69 64 20 69 6e 74 0a |define v|oid int.|
|00002540| 23 20 65 6e 64 69 66 20 | 2f 2a 20 4e 4f 56 4f 49 |# endif |/* NOVOI|
|00002550| 44 20 2a 2f 0a 23 65 6e | 64 69 66 20 2f 2a 20 5f |D */.#en|dif /* _|
|00002560| 5f 53 54 44 43 5f 5f 20 | 7c 7c 20 44 4f 53 20 2a |_STDC__ ||| DOS *|
|00002570| 2f 0a 0a 23 69 66 64 65 | 66 20 55 53 45 5f 52 45 |/..#ifde|f USE_RE|
|00002580| 41 44 4c 49 4e 45 0a 23 | 20 69 6e 63 6c 75 64 65 |ADLINE.#| include|
|00002590| 20 3c 72 65 61 64 6c 69 | 6e 65 2f 72 65 61 64 6c | <readli|ne/readl|
|000025a0| 69 6e 65 2e 68 3e 0a 20 | 20 2f 2a 20 70 72 6f 74 |ine.h>. | /* prot|
|000025b0| 6f 74 79 70 65 73 20 66 | 6f 72 20 66 75 6e 63 74 |otypes f|or funct|
|000025c0| 69 6f 6e 73 20 72 65 6c | 61 74 65 64 20 74 6f 20 |ions rel|ated to |
|000025d0| 72 65 61 64 6c 69 6e 65 | 28 29 20 2a 2f 0a 20 20 |readline|() */. |
|000025e0| 63 68 61 72 20 2a 20 67 | 65 74 6c 69 6e 65 28 29 |char * g|etline()|
|000025f0| 3b 0a 20 20 63 68 61 72 | 20 2a 2a 20 61 74 74 65 |;. char| ** atte|
|00002600| 6d 70 74 5f 63 6f 6d 70 | 6c 65 74 69 6f 6e 28 63 |mpt_comp|letion(c|
|00002610| 68 61 72 20 2a 2c 20 69 | 6e 74 2c 20 69 6e 74 29 |har *, i|nt, int)|
|00002620| 3b 0a 20 20 63 68 61 72 | 20 2a 20 6b 65 79 77 6f |;. char| * keywo|
|00002630| 72 64 5f 63 6f 6d 70 6c | 65 74 69 6f 6e 28 63 68 |rd_compl|etion(ch|
|00002640| 61 72 20 2a 2c 20 69 6e | 74 29 3b 0a 20 20 63 68 |ar *, in|t);. ch|
|00002650| 61 72 20 2a 20 63 6f 6d | 6d 61 6e 64 5f 63 6f 6d |ar * com|mand_com|
|00002660| 70 6c 65 74 69 6f 6e 28 | 63 68 61 72 20 2a 2c 20 |pletion(|char *, |
|00002670| 69 6e 74 29 3b 0a 23 65 | 6e 64 69 66 0a 0a 2f 2a |int);.#e|ndif../*|
|00002680| 20 6d 61 78 69 6d 75 6d | 20 23 20 6f 66 20 63 68 | maximum| # of ch|
|00002690| 61 72 73 20 66 72 6f 6d | 20 70 72 6f 67 6e 61 6d |ars from| prognam|
|000026a0| 65 20 74 6f 20 64 69 73 | 70 6c 61 79 20 69 6e 20 |e to dis|play in |
|000026b0| 70 72 6f 6d 70 74 20 2a | 2f 0a 23 64 65 66 69 6e |prompt *|/.#defin|
|000026c0| 65 20 4d 41 58 5f 4e 41 | 4d 45 20 33 32 0a 0a 2f |e MAX_NA|ME 32../|
|000026d0| 2a 20 74 68 69 73 20 69 | 73 20 74 68 65 20 70 72 |* this i|s the pr|
|000026e0| 6f 6d 70 74 20 66 6f 72 | 20 72 65 61 64 6c 69 6e |ompt for| readlin|
|000026f0| 65 28 29 20 74 6f 20 64 | 69 73 70 6c 61 79 20 2a |e() to d|isplay *|
|00002700| 2f 0a 63 68 61 72 20 63 | 64 65 63 6c 5f 70 72 6f |/.char c|decl_pro|
|00002710| 6d 70 74 5b 4d 41 58 5f | 4e 41 4d 45 2b 33 5d 3b |mpt[MAX_|NAME+3];|
|00002720| 0a 0a 2f 2a 20 62 61 63 | 6b 75 70 20 63 6f 70 79 |../* bac|kup copy|
|00002730| 20 6f 66 20 70 72 6f 6d | 70 74 20 74 6f 20 73 61 | of prom|pt to sa|
|00002740| 76 65 20 69 74 20 77 68 | 69 6c 65 20 70 72 6f 6d |ve it wh|ile prom|
|00002750| 70 74 69 6e 67 20 69 73 | 20 6f 66 66 20 2a 2f 0a |pting is| off */.|
|00002760| 63 68 61 72 20 72 65 61 | 6c 5f 70 72 6f 6d 70 74 |char rea|l_prompt|
|00002770| 5b 4d 41 58 5f 4e 41 4d | 45 2b 33 5d 3b 0a 0a 23 |[MAX_NAM|E+3];..#|
|00002780| 64 65 66 69 6e 65 09 4d | 42 5f 53 48 4f 52 54 09 |define.M|B_SHORT.|
|00002790| 30 30 30 31 0a 23 64 65 | 66 69 6e 65 09 4d 42 5f |0001.#de|fine.MB_|
|000027a0| 4c 4f 4e 47 09 09 30 30 | 30 32 0a 23 64 65 66 69 |LONG..00|02.#defi|
|000027b0| 6e 65 09 4d 42 5f 55 4e | 53 49 47 4e 45 44 09 30 |ne.MB_UN|SIGNED.0|
|000027c0| 30 30 34 0a 23 64 65 66 | 69 6e 65 20 4d 42 5f 49 |004.#def|ine MB_I|
|000027d0| 4e 54 09 09 30 30 31 30 | 0a 23 64 65 66 69 6e 65 |NT..0010|.#define|
|000027e0| 20 4d 42 5f 43 48 41 52 | 09 09 30 30 32 30 0a 23 | MB_CHAR|..0020.#|
|000027f0| 64 65 66 69 6e 65 20 4d | 42 5f 46 4c 4f 41 54 09 |define M|B_FLOAT.|
|00002800| 30 30 34 30 0a 23 64 65 | 66 69 6e 65 20 4d 42 5f |0040.#de|fine MB_|
|00002810| 44 4f 55 42 4c 45 09 30 | 31 30 30 0a 23 64 65 66 |DOUBLE.0|100.#def|
|00002820| 69 6e 65 20 4d 42 5f 56 | 4f 49 44 09 09 30 32 30 |ine MB_V|OID..020|
|00002830| 30 0a 23 64 65 66 69 6e | 65 09 4d 42 5f 53 49 47 |0.#defin|e.MB_SIG|
|00002840| 4e 45 44 09 30 34 30 30 | 0a 0a 23 64 65 66 69 6e |NED.0400|..#defin|
|00002850| 65 20 4e 75 6c 6c 43 50 | 20 28 28 63 68 61 72 2a |e NullCP| ((char*|
|00002860| 29 4e 55 4c 4c 29 0a 23 | 69 66 64 65 66 20 64 6f |)NULL).#|ifdef do|
|00002870| 64 65 62 75 67 0a 23 20 | 64 65 66 69 6e 65 20 44 |debug.# |define D|
|00002880| 65 62 75 67 28 78 29 20 | 64 6f 20 7b 20 69 66 20 |ebug(x) |do { if |
|00002890| 28 44 65 62 75 67 46 6c | 61 67 29 20 28 76 6f 69 |(DebugFl|ag) (voi|
|000028a0| 64 29 20 66 70 72 69 6e | 74 66 20 78 3b 20 7d 20 |d) fprin|tf x; } |
|000028b0| 77 68 69 6c 65 20 28 30 | 29 0a 23 65 6c 73 65 0a |while (0|).#else.|
|000028c0| 23 20 64 65 66 69 6e 65 | 20 44 65 62 75 67 28 78 |# define| Debug(x|
|000028d0| 29 20 2f 2a 20 6e 6f 74 | 68 69 6e 67 20 2a 2f 0a |) /* not|hing */.|
|000028e0| 23 65 6e 64 69 66 0a 0a | 23 69 66 20 5f 5f 53 54 |#endif..|#if __ST|
|000028f0| 44 43 5f 5f 0a 20 20 63 | 68 61 72 20 2a 64 73 28 |DC__. c|har *ds(|
|00002900| 63 68 61 72 20 2a 29 2c | 20 2a 63 61 74 28 63 68 |char *),| *cat(ch|
|00002910| 61 72 20 2a 2c 20 2e 2e | 2e 29 2c 20 2a 76 69 73 |ar *, ..|.), *vis|
|00002920| 69 62 6c 65 28 69 6e 74 | 29 3b 0a 20 20 69 6e 74 |ible(int|);. int|
|00002930| 20 67 65 74 6f 70 74 28 | 69 6e 74 2c 63 68 61 72 | getopt(|int,char|
|00002940| 20 2a 2a 2c 63 68 61 72 | 20 2a 29 3b 0a 20 20 69 | **,char| *);. i|
|00002950| 6e 74 20 6d 61 69 6e 28 | 69 6e 74 2c 20 63 68 61 |nt main(|int, cha|
|00002960| 72 20 2a 2a 29 3b 0a 20 | 20 69 6e 74 20 79 79 77 |r **);. | int yyw|
|00002970| 72 61 70 28 76 6f 69 64 | 29 3b 0a 20 20 69 6e 74 |rap(void|);. int|
|00002980| 20 64 6f 73 74 64 69 6e | 28 76 6f 69 64 29 3b 0a | dostdin|(void);.|
|00002990| 20 20 76 6f 69 64 20 6d | 62 63 68 65 63 6b 28 76 | void m|bcheck(v|
|000029a0| 6f 69 64 29 2c 20 64 6f | 68 65 6c 70 28 76 6f 69 |oid), do|help(voi|
|000029b0| 64 29 2c 20 75 73 61 67 | 65 28 76 6f 69 64 29 3b |d), usag|e(void);|
|000029c0| 0a 20 20 76 6f 69 64 20 | 70 72 6f 6d 70 74 28 76 |. void |prompt(v|
|000029d0| 6f 69 64 29 2c 20 64 6f | 70 72 6f 6d 70 74 28 76 |oid), do|prompt(v|
|000029e0| 6f 69 64 29 2c 20 6e 6f | 70 72 6f 6d 70 74 28 76 |oid), no|prompt(v|
|000029f0| 6f 69 64 29 3b 0a 20 20 | 76 6f 69 64 20 75 6e 73 |oid);. |void uns|
|00002a00| 75 70 70 28 63 68 61 72 | 20 2a 2c 20 63 68 61 72 |upp(char| *, char|
|00002a10| 20 2a 29 3b 0a 20 20 76 | 6f 69 64 20 6e 6f 74 73 | *);. v|oid nots|
|00002a20| 75 70 70 6f 72 74 65 64 | 28 63 68 61 72 20 2a 2c |upported|(char *,|
|00002a30| 20 63 68 61 72 20 2a 2c | 20 63 68 61 72 20 2a 29 | char *,| char *)|
|00002a40| 3b 0a 20 20 76 6f 69 64 | 20 79 79 65 72 72 6f 72 |;. void| yyerror|
|00002a50| 28 63 68 61 72 20 2a 29 | 3b 0a 20 20 76 6f 69 64 |(char *)|;. void|
|00002a60| 20 64 6f 73 65 74 28 63 | 68 61 72 20 2a 29 3b 0a | doset(c|har *);.|
|00002a70| 20 20 76 6f 69 64 20 64 | 6f 64 65 63 6c 61 72 65 | void d|odeclare|
|00002a80| 28 63 68 61 72 2a 2c 20 | 63 68 61 72 2a 2c 20 63 |(char*, |char*, c|
|00002a90| 68 61 72 2a 2c 20 63 68 | 61 72 2a 2c 20 63 68 61 |har*, ch|ar*, cha|
|00002aa0| 72 2a 29 3b 0a 20 20 76 | 6f 69 64 20 64 6f 63 61 |r*);. v|oid doca|
|00002ab0| 73 74 28 63 68 61 72 2a | 2c 20 63 68 61 72 2a 2c |st(char*|, char*,|
|00002ac0| 20 63 68 61 72 2a 2c 20 | 63 68 61 72 2a 29 3b 0a | char*, |char*);.|
|00002ad0| 20 20 76 6f 69 64 20 64 | 6f 64 65 78 70 6c 61 69 | void d|odexplai|
|00002ae0| 6e 28 63 68 61 72 2a 2c | 20 63 68 61 72 2a 2c 20 |n(char*,| char*, |
|00002af0| 63 68 61 72 2a 2c 20 63 | 68 61 72 2a 29 3b 0a 20 |char*, c|har*);. |
|00002b00| 20 76 6f 69 64 20 64 6f | 63 65 78 70 6c 61 69 6e | void do|cexplain|
|00002b10| 28 63 68 61 72 2a 2c 20 | 63 68 61 72 2a 2c 20 63 |(char*, |char*, c|
|00002b20| 68 61 72 2a 2c 20 63 68 | 61 72 2a 29 3b 0a 20 20 |har*, ch|ar*);. |
|00002b30| 76 6f 69 64 20 73 65 74 | 70 72 6f 67 6e 61 6d 65 |void set|progname|
|00002b40| 28 63 68 61 72 20 2a 29 | 3b 0a 20 20 69 6e 74 20 |(char *)|;. int |
|00002b50| 64 6f 74 6d 70 66 69 6c | 65 28 69 6e 74 2c 20 63 |dotmpfil|e(int, c|
|00002b60| 68 61 72 2a 2a 29 2c 20 | 64 6f 66 69 6c 65 61 72 |har**), |dofilear|
|00002b70| 67 73 28 69 6e 74 2c 20 | 63 68 61 72 2a 2a 29 3b |gs(int, |char**);|
|00002b80| 0a 23 65 6c 73 65 0a 20 | 20 63 68 61 72 20 2a 64 |.#else. | char *d|
|00002b90| 73 28 29 2c 20 2a 63 61 | 74 28 29 2c 20 2a 76 69 |s(), *ca|t(), *vi|
|00002ba0| 73 69 62 6c 65 28 29 3b | 0a 20 20 69 6e 74 20 67 |sible();|. int g|
|00002bb0| 65 74 6f 70 74 28 29 3b | 0a 20 20 76 6f 69 64 20 |etopt();|. void |
|00002bc0| 6d 62 63 68 65 63 6b 28 | 29 2c 20 64 6f 68 65 6c |mbcheck(|), dohel|
|00002bd0| 70 28 29 2c 20 75 73 61 | 67 65 28 29 3b 0a 20 20 |p(), usa|ge();. |
|00002be0| 76 6f 69 64 20 70 72 6f | 6d 70 74 28 29 2c 20 64 |void pro|mpt(), d|
|00002bf0| 6f 70 72 6f 6d 70 74 28 | 29 2c 20 6e 6f 70 72 6f |oprompt(|), nopro|
|00002c00| 6d 70 74 28 29 3b 0a 20 | 20 76 6f 69 64 20 75 6e |mpt();. | void un|
|00002c10| 73 75 70 70 28 29 2c 20 | 6e 6f 74 73 75 70 70 6f |supp(), |notsuppo|
|00002c20| 72 74 65 64 28 29 3b 0a | 20 20 76 6f 69 64 20 79 |rted();.| void y|
|00002c30| 79 65 72 72 6f 72 28 29 | 3b 0a 20 20 76 6f 69 64 |yerror()|;. void|
|00002c40| 20 64 6f 73 65 74 28 29 | 2c 20 64 6f 64 65 63 6c | doset()|, dodecl|
|00002c50| 61 72 65 28 29 2c 20 64 | 6f 63 61 73 74 28 29 2c |are(), d|ocast(),|
|00002c60| 20 64 6f 64 65 78 70 6c | 61 69 6e 28 29 2c 20 64 | dodexpl|ain(), d|
|00002c70| 6f 63 65 78 70 6c 61 69 | 6e 28 29 3b 0a 20 20 76 |ocexplai|n();. v|
|00002c80| 6f 69 64 20 73 65 74 70 | 72 6f 67 6e 61 6d 65 28 |oid setp|rogname(|
|00002c90| 29 3b 0a 20 20 69 6e 74 | 20 64 6f 74 6d 70 66 69 |);. int| dotmpfi|
|00002ca0| 6c 65 28 29 2c 20 64 6f | 66 69 6c 65 61 72 67 73 |le(), do|fileargs|
|00002cb0| 28 29 3b 0a 23 65 6e 64 | 69 66 20 2f 2a 20 5f 5f |();.#end|if /* __|
|00002cc0| 53 54 44 43 5f 5f 20 2a | 2f 0a 20 20 46 49 4c 45 |STDC__ *|/. FILE|
|00002cd0| 20 2a 74 6d 70 66 69 6c | 65 28 29 3b 0a 0a 2f 2a | *tmpfil|e();../*|
|00002ce0| 20 76 61 72 69 61 62 6c | 65 73 20 75 73 65 64 20 | variabl|es used |
|00002cf0| 64 75 72 69 6e 67 20 70 | 61 72 73 69 6e 67 20 2a |during p|arsing *|
|00002d00| 2f 0a 75 6e 73 69 67 6e | 65 64 20 6d 6f 64 62 69 |/.unsign|ed modbi|
|00002d10| 74 73 20 3d 20 30 3b 0a | 69 6e 74 20 61 72 62 64 |ts = 0;.|int arbd|
|00002d20| 69 6d 73 20 3d 20 31 3b | 0a 63 68 61 72 20 2a 73 |ims = 1;|.char *s|
|00002d30| 61 76 65 64 6e 61 6d 65 | 20 3d 20 30 3b 0a 63 68 |avedname| = 0;.ch|
|00002d40| 61 72 20 75 6e 6b 6e 6f | 77 6e 5f 6e 61 6d 65 5b |ar unkno|wn_name[|
|00002d50| 5d 20 3d 20 22 75 6e 6b | 6e 6f 77 6e 5f 6e 61 6d |] = "unk|nown_nam|
|00002d60| 65 22 3b 0a 63 68 61 72 | 20 70 72 65 76 20 3d 20 |e";.char| prev = |
|00002d70| 30 3b 09 09 2f 2a 20 74 | 68 65 20 63 75 72 72 65 |0;../* t|he curre|
|00002d80| 6e 74 20 74 79 70 65 20 | 6f 66 20 74 68 65 20 76 |nt type |of the v|
|00002d90| 61 72 69 61 62 6c 65 20 | 62 65 69 6e 67 20 65 78 |ariable |being ex|
|00002da0| 61 6d 69 6e 65 64 20 2a | 2f 0a 09 09 09 2f 2a 20 |amined *|/..../* |
|00002db0| 20 20 20 76 61 6c 75 65 | 73 09 74 79 70 65 09 09 | value|s.type..|
|00002dc0| 09 09 20 20 20 2a 2f 0a | 09 09 09 2f 2a 09 70 09 |.. */.|.../*.p.|
|00002dd0| 70 6f 69 6e 74 65 72 09 | 09 09 09 20 20 20 2a 2f |pointer.|... */|
|00002de0| 0a 09 09 09 2f 2a 09 72 | 09 72 65 66 65 72 65 6e |..../*.r|.referen|
|00002df0| 63 65 09 09 09 20 20 20 | 2a 2f 0a 09 09 09 2f 2a |ce... |*/..../*|
|00002e00| 09 66 09 66 75 6e 63 74 | 69 6f 6e 09 09 09 20 20 |.f.funct|ion... |
|00002e10| 20 2a 2f 0a 09 09 09 2f | 2a 09 61 09 61 72 72 61 | */..../|*.a.arra|
|00002e20| 79 20 28 6f 66 20 61 72 | 62 69 74 72 61 72 79 20 |y (of ar|bitrary |
|00002e30| 64 69 6d 65 6e 73 69 6f | 6e 73 29 20 20 20 20 2a |dimensio|ns) *|
|00002e40| 2f 0a 09 09 09 2f 2a 09 | 41 09 61 72 72 61 79 20 |/..../*.|A.array |
|00002e50| 77 69 74 68 20 64 69 6d | 65 6e 73 69 6f 6e 73 09 |with dim|ensions.|
|00002e60| 09 20 20 20 2a 2f 0a 09 | 09 09 2f 2a 09 6e 09 6e |. */..|../*.n.n|
|00002e70| 61 6d 65 09 09 09 09 20 | 20 20 2a 2f 0a 09 09 09 |ame.... | */....|
|00002e80| 2f 2a 09 76 09 76 6f 69 | 64 09 09 09 09 20 20 20 |/*.v.voi|d.... |
|00002e90| 2a 2f 0a 09 09 09 2f 2a | 09 73 09 73 74 72 75 63 |*/..../*|.s.struc|
|00002ea0| 74 20 7c 20 63 6c 61 73 | 73 09 09 09 20 20 20 2a |t | clas|s... *|
|00002eb0| 2f 0a 09 09 09 2f 2a 09 | 74 09 73 69 6d 70 6c 65 |/..../*.|t.simple|
|00002ec0| 20 74 79 70 65 20 28 69 | 6e 74 2c 20 6c 6f 6e 67 | type (i|nt, long|
|00002ed0| 2c 20 65 74 63 2e 29 09 | 20 20 20 2a 2f 0a 0a 2f |, etc.).| */../|
|00002ee0| 2a 20 6f 70 74 69 6f 6e | 73 20 2a 2f 0a 69 6e 74 |* option|s */.int|
|00002ef0| 20 52 69 74 63 68 69 65 | 46 6c 61 67 20 3d 20 30 | Ritchie|Flag = 0|
|00002f00| 3b 09 09 2f 2a 20 2d 72 | 2c 20 61 73 73 75 6d 65 |;../* -r|, assume|
|00002f10| 20 52 69 74 63 68 69 65 | 20 50 44 50 20 43 20 6c | Ritchie| PDP C l|
|00002f20| 61 6e 67 75 61 67 65 20 | 2a 2f 0a 69 6e 74 20 4d |anguage |*/.int M|
|00002f30| 6b 50 72 6f 67 72 61 6d | 46 6c 61 67 20 3d 20 30 |kProgram|Flag = 0|
|00002f40| 3b 09 09 2f 2a 20 2d 63 | 2c 20 6f 75 74 70 75 74 |;../* -c|, output|
|00002f50| 20 7b 7d 20 61 6e 64 20 | 3b 20 61 66 74 65 72 20 | {} and |; after |
|00002f60| 64 65 63 6c 61 72 61 74 | 69 6f 6e 73 20 2a 2f 0a |declarat|ions */.|
|00002f70| 69 6e 74 20 50 72 65 41 | 4e 53 49 46 6c 61 67 20 |int PreA|NSIFlag |
|00002f80| 3d 20 30 3b 09 09 2f 2a | 20 2d 70 2c 20 61 73 73 |= 0;../*| -p, ass|
|00002f90| 75 6d 65 20 70 72 65 2d | 41 4e 53 49 20 43 20 6c |ume pre-|ANSI C l|
|00002fa0| 61 6e 67 75 61 67 65 20 | 2a 2f 0a 69 6e 74 20 43 |anguage |*/.int C|
|00002fb0| 70 6c 75 73 70 6c 75 73 | 46 6c 61 67 20 3d 20 30 |plusplus|Flag = 0|
|00002fc0| 3b 09 09 2f 2a 20 2d 2b | 2c 20 61 73 73 75 6d 65 |;../* -+|, assume|
|00002fd0| 20 43 2b 2b 20 6c 61 6e | 67 75 61 67 65 20 2a 2f | C++ lan|guage */|
|00002fe0| 0a 69 6e 74 20 4f 6e 41 | 54 74 79 20 3d 20 30 3b |.int OnA|Tty = 0;|
|00002ff0| 09 09 09 2f 2a 20 73 74 | 64 69 6e 20 69 73 20 63 |.../* st|din is c|
|00003000| 6f 6d 69 6e 67 20 66 72 | 6f 6d 20 61 20 74 65 72 |oming fr|om a ter|
|00003010| 6d 69 6e 61 6c 20 2a 2f | 0a 69 6e 74 20 49 6e 74 |minal */|.int Int|
|00003020| 65 72 61 63 74 69 76 65 | 20 3d 20 30 3b 09 09 2f |eractive| = 0;../|
|00003030| 2a 20 2d 69 2c 20 6f 76 | 65 72 72 69 64 65 73 20 |* -i, ov|errides |
|00003040| 4f 6e 41 54 74 79 20 2a | 2f 0a 69 6e 74 20 4b 65 |OnATty *|/.int Ke|
|00003050| 79 77 6f 72 64 4e 61 6d | 65 20 3d 20 30 3b 09 09 |ywordNam|e = 0;..|
|00003060| 2f 2a 20 24 30 20 69 73 | 20 61 20 6b 65 79 77 6f |/* $0 is| a keywo|
|00003070| 72 64 20 28 64 65 63 6c | 61 72 65 2c 20 65 78 70 |rd (decl|are, exp|
|00003080| 6c 61 69 6e 2c 20 63 61 | 73 74 29 20 2a 2f 0a 63 |lain, ca|st) */.c|
|00003090| 68 61 72 20 2a 70 72 6f | 67 6e 61 6d 65 20 3d 20 |har *pro|gname = |
|000030a0| 22 63 64 65 63 6c 22 3b | 09 2f 2a 20 24 30 20 2a |"cdecl";|./* $0 *|
|000030b0| 2f 0a 69 6e 74 20 71 75 | 69 65 74 20 3d 20 30 3b |/.int qu|iet = 0;|
|000030c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000030d0| 20 20 2f 2a 20 2d 71 2c | 20 71 75 69 65 74 73 20 | /* -q,| quiets |
|000030e0| 70 72 6f 6d 70 74 20 61 | 6e 64 20 69 6e 69 74 69 |prompt a|nd initi|
|000030f0| 61 6c 20 68 65 6c 70 20 | 6d 73 67 20 2a 2f 0a 0a |al help |msg */..|
|00003100| 23 69 66 20 64 6f 64 65 | 62 75 67 0a 69 6e 74 20 |#if dode|bug.int |
|00003110| 44 65 62 75 67 46 6c 61 | 67 20 3d 20 30 3b 09 09 |DebugFla|g = 0;..|
|00003120| 2f 2a 20 2d 64 2c 20 6f | 75 74 70 75 74 20 64 65 |/* -d, o|utput de|
|00003130| 62 75 67 67 69 6e 67 20 | 74 72 61 63 65 20 69 6e |bugging |trace in|
|00003140| 66 6f 20 2a 2f 0a 23 65 | 6e 64 69 66 0a 0a 23 69 |fo */.#e|ndif..#i|
|00003150| 66 64 65 66 20 64 6f 79 | 79 64 65 62 75 67 09 09 |fdef doy|ydebug..|
|00003160| 2f 2a 20 63 6f 6d 70 69 | 6c 65 20 69 6e 20 79 61 |/* compi|le in ya|
|00003170| 63 63 20 74 72 61 63 65 | 20 73 74 61 74 65 6d 65 |cc trace| stateme|
|00003180| 6e 74 73 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 59 |nts */.#|define Y|
|00003190| 59 44 45 42 55 47 20 31 | 0a 23 65 6e 64 69 66 20 |YDEBUG 1|.#endif |
|000031a0| 2f 2a 20 64 6f 79 79 64 | 65 62 75 67 20 2a 2f 0a |/* doyyd|ebug */.|
|000031b0| 0a 23 69 6e 63 6c 75 64 | 65 20 22 63 64 67 72 61 |.#includ|e "cdgra|
|000031c0| 6d 2e 63 22 0a 23 69 6e | 63 6c 75 64 65 20 22 63 |m.c".#in|clude "c|
|000031d0| 64 6c 65 78 2e 63 22 0a | 0c 0a 2f 2a 20 64 65 66 |dlex.c".|../* def|
|000031e0| 69 6e 69 74 69 6f 6e 73 | 20 28 61 6e 64 20 61 62 |initions| (and ab|
|000031f0| 62 72 65 76 69 61 74 69 | 6f 6e 73 29 20 66 6f 72 |breviati|ons) for|
|00003200| 20 74 79 70 65 20 63 6f | 6d 62 69 6e 61 74 69 6f | type co|mbinatio|
|00003210| 6e 73 20 63 72 6f 73 73 | 20 63 68 65 63 6b 20 74 |ns cross| check t|
|00003220| 61 62 6c 65 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |able */.|#define |
|00003230| 41 4c 57 41 59 53 09 30 | 09 2f 2a 20 63 6f 6d 62 |ALWAYS.0|./* comb|
|00003240| 6f 20 61 6c 77 61 79 73 | 20 6f 6b 61 79 20 2a 2f |o always| okay */|
|00003250| 0a 23 64 65 66 69 6e 65 | 20 5f 09 41 4c 57 41 59 |.#define| _.ALWAY|
|00003260| 53 0a 23 64 65 66 69 6e | 65 20 4e 45 56 45 52 09 |S.#defin|e NEVER.|
|00003270| 31 09 2f 2a 20 63 6f 6d | 62 6f 20 6e 65 76 65 72 |1./* com|bo never|
|00003280| 20 61 6c 6c 6f 77 65 64 | 20 2a 2f 0a 23 64 65 66 | allowed| */.#def|
|00003290| 69 6e 65 20 58 09 4e 45 | 56 45 52 0a 23 64 65 66 |ine X.NE|VER.#def|
|000032a0| 69 6e 65 20 52 49 54 43 | 48 49 45 09 32 09 2f 2a |ine RITC|HIE.2./*|
|000032b0| 20 63 6f 6d 62 6f 20 6e | 6f 74 20 61 6c 6c 6f 77 | combo n|ot allow|
|000032c0| 65 64 20 69 6e 20 52 69 | 74 63 68 69 65 20 63 6f |ed in Ri|tchie co|
|000032d0| 6d 70 69 6c 65 72 20 2a | 2f 0a 23 64 65 66 69 6e |mpiler *|/.#defin|
|000032e0| 65 20 52 09 52 49 54 43 | 48 49 45 0a 23 64 65 66 |e R.RITC|HIE.#def|
|000032f0| 69 6e 65 20 50 52 45 41 | 4e 53 49 09 33 09 2f 2a |ine PREA|NSI.3./*|
|00003300| 20 63 6f 6d 62 6f 20 6e | 6f 74 20 61 6c 6c 6f 77 | combo n|ot allow|
|00003310| 65 64 20 69 6e 20 50 72 | 65 2d 41 4e 53 49 20 63 |ed in Pr|e-ANSI c|
|00003320| 6f 6d 70 69 6c 65 72 20 | 2a 2f 0a 23 64 65 66 69 |ompiler |*/.#defi|
|00003330| 6e 65 20 50 09 50 52 45 | 41 4e 53 49 0a 23 64 65 |ne P.PRE|ANSI.#de|
|00003340| 66 69 6e 65 20 41 4e 53 | 49 09 34 09 2f 2a 20 63 |fine ANS|I.4./* c|
|00003350| 6f 6d 62 6f 20 6e 6f 74 | 20 61 6c 6c 6f 77 65 64 |ombo not| allowed|
|00003360| 20 61 6e 79 6d 6f 72 65 | 20 69 6e 20 41 4e 53 49 | anymore| in ANSI|
|00003370| 20 63 6f 6d 70 69 6c 65 | 72 20 2a 2f 0a 23 64 65 | compile|r */.#de|
|00003380| 66 69 6e 65 20 41 09 41 | 4e 53 49 0a 0a 2f 2a 20 |fine A.A|NSI../* |
|00003390| 54 68 69 73 20 69 73 20 | 61 6e 20 6c 6f 77 65 72 |This is |an lower|
|000033a0| 20 6c 65 66 74 20 74 72 | 69 61 6e 67 75 6c 61 72 | left tr|iangular|
|000033b0| 20 61 72 72 61 79 2e 20 | 49 66 20 77 65 20 6e 65 | array. |If we ne|
|000033c0| 65 64 65 64 20 2a 2f 0a | 2f 2a 20 74 6f 20 73 61 |eded */.|/* to sa|
|000033d0| 76 65 20 39 20 62 79 74 | 65 73 2c 20 74 68 65 20 |ve 9 byt|es, the |
|000033e0| 22 6c 6f 6e 67 22 20 72 | 6f 77 20 63 61 6e 20 62 |"long" r|ow can b|
|000033f0| 65 20 72 65 6d 6f 76 65 | 64 2e 20 2a 2f 0a 63 68 |e remove|d. */.ch|
|00003400| 61 72 20 63 72 6f 73 73 | 63 68 65 63 6b 5b 39 5d |ar cross|check[9]|
|00003410| 5b 39 5d 20 3d 20 7b 0a | 20 20 20 20 2f 2a 09 09 |[9] = {.| /*..|
|00003420| 09 4c 2c 20 49 2c 20 53 | 2c 20 43 2c 20 56 2c 20 |.L, I, S|, C, V, |
|00003430| 55 2c 20 53 2c 20 46 2c | 20 44 2c 20 2a 2f 0a 20 |U, S, F,| D, */. |
|00003440| 20 20 20 2f 2a 20 6c 6f | 6e 67 20 2a 2f 09 09 5f | /* lo|ng */.._|
|00003450| 2c 20 5f 2c 20 5f 2c 20 | 5f 2c 20 5f 2c 20 5f 2c |, _, _, |_, _, _,|
|00003460| 20 5f 2c 20 5f 2c 20 5f | 2c 0a 20 20 20 20 2f 2a | _, _, _|,. /*|
|00003470| 20 69 6e 74 20 2a 2f 09 | 09 5f 2c 20 5f 2c 20 5f | int */.|._, _, _|
|00003480| 2c 20 5f 2c 20 5f 2c 20 | 5f 2c 20 5f 2c 20 5f 2c |, _, _, |_, _, _,|
|00003490| 20 5f 2c 0a 20 20 20 20 | 2f 2a 20 73 68 6f 72 74 | _,. |/* short|
|000034a0| 20 2a 2f 09 09 58 2c 20 | 5f 2c 20 5f 2c 20 5f 2c | */..X, |_, _, _,|
|000034b0| 20 5f 2c 20 5f 2c 20 5f | 2c 20 5f 2c 20 5f 2c 0a | _, _, _|, _, _,.|
|000034c0| 20 20 20 20 2f 2a 20 63 | 68 61 72 20 2a 2f 09 09 | /* c|har */..|
|000034d0| 58 2c 20 58 2c 20 58 2c | 20 5f 2c 20 5f 2c 20 5f |X, X, X,| _, _, _|
|000034e0| 2c 20 5f 2c 20 5f 2c 20 | 5f 2c 0a 20 20 20 20 2f |, _, _, |_,. /|
|000034f0| 2a 20 76 6f 69 64 20 2a | 2f 09 09 58 2c 20 58 2c |* void *|/..X, X,|
|00003500| 20 58 2c 20 58 2c 20 5f | 2c 20 5f 2c 20 5f 2c 20 | X, X, _|, _, _, |
|00003510| 5f 2c 20 5f 2c 0a 20 20 | 20 20 2f 2a 20 75 6e 73 |_, _,. | /* uns|
|00003520| 69 67 6e 65 64 20 2a 2f | 09 52 2c 20 5f 2c 20 52 |igned */|.R, _, R|
|00003530| 2c 20 52 2c 20 58 2c 20 | 5f 2c 20 5f 2c 20 5f 2c |, R, X, |_, _, _,|
|00003540| 20 5f 2c 0a 20 20 20 20 | 2f 2a 20 73 69 67 6e 65 | _,. |/* signe|
|00003550| 64 20 2a 2f 09 50 2c 20 | 50 2c 20 50 2c 20 50 2c |d */.P, |P, P, P,|
|00003560| 20 58 2c 20 58 2c 20 5f | 2c 20 5f 2c 20 5f 2c 0a | X, X, _|, _, _,.|
|00003570| 20 20 20 20 2f 2a 20 66 | 6c 6f 61 74 20 2a 2f 09 | /* f|loat */.|
|00003580| 09 41 2c 20 58 2c 20 58 | 2c 20 58 2c 20 58 2c 20 |.A, X, X|, X, X, |
|00003590| 58 2c 20 58 2c 20 5f 2c | 20 5f 2c 0a 20 20 20 20 |X, X, _,| _,. |
|000035a0| 2f 2a 20 64 6f 75 62 6c | 65 20 2a 2f 09 50 2c 20 |/* doubl|e */.P, |
|000035b0| 58 2c 20 58 2c 20 58 2c | 20 58 2c 20 58 2c 20 58 |X, X, X,| X, X, X|
|000035c0| 2c 20 58 2c 20 5f 0a 7d | 3b 0a 0a 2f 2a 20 74 68 |, X, _.}|;../* th|
|000035d0| 65 20 6e 61 6d 65 73 20 | 61 6e 64 20 62 69 74 73 |e names |and bits|
|000035e0| 20 63 68 65 63 6b 65 64 | 20 66 6f 72 20 65 61 63 | checked| for eac|
|000035f0| 68 20 72 6f 77 20 69 6e | 20 74 68 65 20 61 62 6f |h row in| the abo|
|00003600| 76 65 20 61 72 72 61 79 | 20 2a 2f 0a 73 74 72 75 |ve array| */.stru|
|00003610| 63 74 0a 20 20 20 20 7b | 0a 20 20 20 20 63 68 61 |ct. {|. cha|
|00003620| 72 20 2a 6e 61 6d 65 3b | 0a 20 20 20 20 69 6e 74 |r *name;|. int|
|00003630| 20 62 69 74 3b 0a 20 20 | 20 20 7d 20 63 72 6f 73 | bit;. | } cros|
|00003640| 73 74 79 70 65 73 5b 39 | 5d 20 3d 0a 09 7b 0a 09 |stypes[9|] =..{..|
|00003650| 20 20 20 20 7b 20 22 6c | 6f 6e 67 22 2c 09 09 4d | { "l|ong",..M|
|00003660| 42 5f 4c 4f 4e 47 09 09 | 7d 2c 0a 09 20 20 20 20 |B_LONG..|},.. |
|00003670| 7b 20 22 69 6e 74 22 2c | 09 09 4d 42 5f 49 4e 54 |{ "int",|..MB_INT|
|00003680| 09 09 7d 2c 0a 09 20 20 | 20 20 7b 20 22 73 68 6f |..},.. | { "sho|
|00003690| 72 74 22 2c 09 09 4d 42 | 5f 53 48 4f 52 54 09 7d |rt",..MB|_SHORT.}|
|000036a0| 2c 0a 09 20 20 20 20 7b | 20 22 63 68 61 72 22 2c |,.. {| "char",|
|000036b0| 09 09 4d 42 5f 43 48 41 | 52 09 09 7d 2c 0a 09 20 |..MB_CHA|R..},.. |
|000036c0| 20 20 20 7b 20 22 76 6f | 69 64 22 2c 09 09 4d 42 | { "vo|id",..MB|
|000036d0| 5f 56 4f 49 44 09 09 7d | 2c 0a 09 20 20 20 20 7b |_VOID..}|,.. {|
|000036e0| 20 22 75 6e 73 69 67 6e | 65 64 22 2c 09 4d 42 5f | "unsign|ed",.MB_|
|000036f0| 55 4e 53 49 47 4e 45 44 | 09 7d 2c 0a 09 20 20 20 |UNSIGNED|.},.. |
|00003700| 20 7b 20 22 73 69 67 6e | 65 64 22 2c 09 09 4d 42 | { "sign|ed",..MB|
|00003710| 5f 53 49 47 4e 45 44 09 | 7d 2c 0a 09 20 20 20 20 |_SIGNED.|},.. |
|00003720| 7b 20 22 66 6c 6f 61 74 | 22 2c 09 09 4d 42 5f 46 |{ "float|",..MB_F|
|00003730| 4c 4f 41 54 09 7d 2c 0a | 09 20 20 20 20 7b 20 22 |LOAT.},.|. { "|
|00003740| 64 6f 75 62 6c 65 22 2c | 09 09 4d 42 5f 44 4f 55 |double",|..MB_DOU|
|00003750| 42 4c 45 09 7d 0a 09 7d | 3b 0a 0a 2f 2a 20 52 75 |BLE.}..}|;../* Ru|
|00003760| 6e 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 63 72 |n throug|h the cr|
|00003770| 6f 73 73 63 68 65 63 6b | 20 61 72 72 61 79 20 6c |osscheck| array l|
|00003780| 6f 6f 6b 69 6e 67 20 2a | 2f 0a 2f 2a 20 66 6f 72 |ooking *|/./* for|
|00003790| 20 75 6e 73 75 70 70 6f | 72 74 65 64 20 63 6f 6d | unsuppo|rted com|
|000037a0| 62 69 6e 61 74 69 6f 6e | 73 20 6f 66 20 74 79 70 |bination|s of typ|
|000037b0| 65 73 2e 20 2a 2f 0a 76 | 6f 69 64 20 6d 62 63 68 |es. */.v|oid mbch|
|000037c0| 65 63 6b 28 29 0a 7b 0a | 20 20 20 20 72 65 67 69 |eck().{.| regi|
|000037d0| 73 74 65 72 20 69 6e 74 | 20 69 2c 20 6a 2c 20 72 |ster int| i, j, r|
|000037e0| 65 73 74 72 69 63 74 3b | 0a 20 20 20 20 63 68 61 |estrict;|. cha|
|000037f0| 72 20 2a 74 31 2c 20 2a | 74 32 3b 0a 0a 20 20 20 |r *t1, *|t2;.. |
|00003800| 20 2f 2a 20 4c 6f 6f 70 | 20 74 68 72 6f 75 67 68 | /* Loop| through|
|00003810| 20 74 68 65 20 74 79 70 | 65 73 20 2a 2f 0a 20 20 | the typ|es */. |
|00003820| 20 20 2f 2a 20 28 73 6b | 69 70 20 74 68 65 20 22 | /* (sk|ip the "|
|00003830| 6c 6f 6e 67 22 20 72 6f | 77 29 20 2a 2f 0a 20 20 |long" ro|w) */. |
|00003840| 20 20 66 6f 72 20 28 69 | 20 3d 20 31 3b 20 69 20 | for (i| = 1; i |
|00003850| 3c 20 39 3b 20 69 2b 2b | 29 0a 09 7b 0a 09 2f 2a |< 9; i++|)..{../*|
|00003860| 20 69 66 20 74 68 69 73 | 20 74 79 70 65 20 69 73 | if this| type is|
|00003870| 20 69 6e 20 75 73 65 20 | 2a 2f 0a 09 69 66 20 28 | in use |*/..if (|
|00003880| 28 6d 6f 64 62 69 74 73 | 20 26 20 63 72 6f 73 73 |(modbits| & cross|
|00003890| 74 79 70 65 73 5b 69 5d | 2e 62 69 74 29 20 21 3d |types[i]|.bit) !=|
|000038a0| 20 30 29 0a 09 20 20 20 | 20 7b 0a 09 20 20 20 20 | 0).. | {.. |
|000038b0| 2f 2a 20 63 68 65 63 6b | 20 66 6f 72 20 6f 74 68 |/* check| for oth|
|000038c0| 65 72 20 74 79 70 65 73 | 20 61 6c 73 6f 20 69 6e |er types| also in|
|000038d0| 20 75 73 65 20 2a 2f 0a | 09 20 20 20 20 66 6f 72 | use */.|. for|
|000038e0| 20 28 6a 20 3d 20 30 3b | 20 6a 20 3c 20 69 3b 20 | (j = 0;| j < i; |
|000038f0| 6a 2b 2b 29 0a 09 09 7b | 0a 09 09 2f 2a 20 74 68 |j++)...{|.../* th|
|00003900| 69 73 20 74 79 70 65 20 | 69 73 20 6e 6f 74 20 69 |is type |is not i|
|00003910| 6e 20 75 73 65 20 2a 2f | 0a 09 09 69 66 20 28 21 |n use */|...if (!|
|00003920| 28 6d 6f 64 62 69 74 73 | 20 26 20 63 72 6f 73 73 |(modbits| & cross|
|00003930| 74 79 70 65 73 5b 6a 5d | 2e 62 69 74 29 29 0a 09 |types[j]|.bit))..|
|00003940| 09 20 20 20 20 63 6f 6e | 74 69 6e 75 65 3b 0a 09 |. con|tinue;..|
|00003950| 09 2f 2a 20 63 68 65 63 | 6b 20 74 68 65 20 74 79 |./* chec|k the ty|
|00003960| 70 65 20 6f 66 20 72 65 | 73 74 72 69 63 74 69 6f |pe of re|strictio|
|00003970| 6e 20 2a 2f 0a 09 09 72 | 65 73 74 72 69 63 74 20 |n */...r|estrict |
|00003980| 3d 20 63 72 6f 73 73 63 | 68 65 63 6b 5b 69 5d 5b |= crossc|heck[i][|
|00003990| 6a 5d 3b 0a 09 09 69 66 | 20 28 72 65 73 74 72 69 |j];...if| (restri|
|000039a0| 63 74 20 3d 3d 20 41 4c | 57 41 59 53 29 0a 09 09 |ct == AL|WAYS)...|
|000039b0| 20 20 20 20 63 6f 6e 74 | 69 6e 75 65 3b 0a 09 09 | cont|inue;...|
|000039c0| 74 31 20 3d 20 63 72 6f | 73 73 74 79 70 65 73 5b |t1 = cro|sstypes[|
|000039d0| 69 5d 2e 6e 61 6d 65 3b | 0a 09 09 74 32 20 3d 20 |i].name;|...t2 = |
|000039e0| 63 72 6f 73 73 74 79 70 | 65 73 5b 6a 5d 2e 6e 61 |crosstyp|es[j].na|
|000039f0| 6d 65 3b 0a 09 09 69 66 | 20 28 72 65 73 74 72 69 |me;...if| (restri|
|00003a00| 63 74 20 3d 3d 20 4e 45 | 56 45 52 29 0a 09 09 20 |ct == NE|VER)... |
|00003a10| 20 20 20 7b 0a 09 09 20 | 20 20 20 6e 6f 74 73 75 | {... | notsu|
|00003a20| 70 70 6f 72 74 65 64 28 | 22 22 2c 20 74 31 2c 20 |pported(|"", t1, |
|00003a30| 74 32 29 3b 0a 09 09 20 | 20 20 20 7d 0a 09 09 65 |t2);... | }...e|
|00003a40| 6c 73 65 20 69 66 20 28 | 72 65 73 74 72 69 63 74 |lse if (|restrict|
|00003a50| 20 3d 3d 20 52 49 54 43 | 48 49 45 29 0a 09 09 20 | == RITC|HIE)... |
|00003a60| 20 20 20 7b 0a 09 09 20 | 20 20 20 69 66 20 28 52 | {... | if (R|
|00003a70| 69 74 63 68 69 65 46 6c | 61 67 29 0a 09 09 09 6e |itchieFl|ag)....n|
|00003a80| 6f 74 73 75 70 70 6f 72 | 74 65 64 28 22 20 28 52 |otsuppor|ted(" (R|
|00003a90| 69 74 63 68 69 65 20 43 | 6f 6d 70 69 6c 65 72 29 |itchie C|ompiler)|
|00003aa0| 22 2c 20 74 31 2c 20 74 | 32 29 3b 0a 09 09 20 20 |", t1, t|2);... |
|00003ab0| 20 20 7d 0a 09 09 65 6c | 73 65 20 69 66 20 28 72 | }...el|se if (r|
|00003ac0| 65 73 74 72 69 63 74 20 | 3d 3d 20 50 52 45 41 4e |estrict |== PREAN|
|00003ad0| 53 49 29 0a 09 09 20 20 | 20 20 7b 0a 09 09 20 20 |SI)... | {... |
|00003ae0| 20 20 69 66 20 28 50 72 | 65 41 4e 53 49 46 6c 61 | if (Pr|eANSIFla|
|00003af0| 67 20 7c 7c 20 52 69 74 | 63 68 69 65 46 6c 61 67 |g || Rit|chieFlag|
|00003b00| 29 0a 09 09 09 6e 6f 74 | 73 75 70 70 6f 72 74 65 |)....not|supporte|
|00003b10| 64 28 22 20 28 50 72 65 | 2d 41 4e 53 49 20 43 6f |d(" (Pre|-ANSI Co|
|00003b20| 6d 70 69 6c 65 72 29 22 | 2c 20 74 31 2c 20 74 32 |mpiler)"|, t1, t2|
|00003b30| 29 3b 0a 09 09 20 20 20 | 20 7d 0a 09 09 65 6c 73 |);... | }...els|
|00003b40| 65 20 69 66 20 28 72 65 | 73 74 72 69 63 74 20 3d |e if (re|strict =|
|00003b50| 3d 20 41 4e 53 49 29 0a | 09 09 20 20 20 20 7b 0a |= ANSI).|.. {.|
|00003b60| 09 09 20 20 20 20 69 66 | 20 28 21 52 69 74 63 68 |.. if| (!Ritch|
|00003b70| 69 65 46 6c 61 67 20 26 | 26 20 21 50 72 65 41 4e |ieFlag &|& !PreAN|
|00003b80| 53 49 46 6c 61 67 29 0a | 09 09 09 6e 6f 74 73 75 |SIFlag).|...notsu|
|00003b90| 70 70 6f 72 74 65 64 28 | 22 20 28 41 4e 53 49 20 |pported(|" (ANSI |
|00003ba0| 43 6f 6d 70 69 6c 65 72 | 29 22 2c 20 74 31 2c 20 |Compiler|)", t1, |
|00003bb0| 74 32 29 3b 0a 09 09 20 | 20 20 20 7d 0a 09 09 65 |t2);... | }...e|
|00003bc0| 6c 73 65 0a 09 09 20 20 | 20 20 7b 0a 09 09 20 20 |lse... | {... |
|00003bd0| 20 20 28 76 6f 69 64 29 | 20 66 70 72 69 6e 74 66 | (void)| fprintf|
|00003be0| 20 28 73 74 64 65 72 72 | 2c 0a 09 09 09 22 25 73 | (stderr|,...."%s|
|00003bf0| 3a 20 49 6e 74 65 72 6e | 61 6c 20 65 72 72 6f 72 |: Intern|al error|
|00003c00| 20 69 6e 20 63 72 6f 73 | 73 63 68 65 63 6b 5b 25 | in cros|scheck[%|
|00003c10| 64 2c 25 64 5d 3d 25 64 | 21 5c 6e 22 2c 0a 09 09 |d,%d]=%d|!\n",...|
|00003c20| 09 70 72 6f 67 6e 61 6d | 65 2c 20 69 2c 20 6a 2c |.prognam|e, i, j,|
|00003c30| 20 72 65 73 74 72 69 63 | 74 29 3b 0a 09 09 20 20 | restric|t);... |
|00003c40| 20 20 65 78 69 74 28 31 | 29 3b 20 2f 2a 20 4e 4f | exit(1|); /* NO|
|00003c50| 54 52 45 41 43 48 45 44 | 20 2a 2f 0a 09 09 20 20 |TREACHED| */... |
|00003c60| 20 20 7d 0a 09 09 7d 0a | 09 20 20 20 20 7d 0a 09 | }...}.|. }..|
|00003c70| 7d 0a 7d 0a 0a 2f 2a 20 | 75 6e 64 65 66 69 6e 65 |}.}../* |undefine|
|00003c80| 20 74 68 65 73 65 20 61 | 73 20 74 68 65 79 20 61 | these a|s they a|
|00003c90| 72 65 20 6e 6f 20 6c 6f | 6e 67 65 72 20 6e 65 65 |re no lo|nger nee|
|00003ca0| 64 65 64 20 2a 2f 0a 23 | 75 6e 64 65 66 20 5f 0a |ded */.#|undef _.|
|00003cb0| 23 75 6e 64 65 66 20 41 | 4c 57 41 59 53 0a 23 75 |#undef A|LWAYS.#u|
|00003cc0| 6e 64 65 66 20 58 0a 23 | 75 6e 64 65 66 20 4e 45 |ndef X.#|undef NE|
|00003cd0| 56 45 52 0a 23 75 6e 64 | 65 66 20 52 0a 23 75 6e |VER.#und|ef R.#un|
|00003ce0| 64 65 66 20 52 49 54 43 | 48 49 45 0a 23 75 6e 64 |def RITC|HIE.#und|
|00003cf0| 65 66 20 50 0a 23 75 6e | 64 65 66 20 50 52 45 41 |ef P.#un|def PREA|
|00003d00| 4e 53 49 0a 23 75 6e 64 | 65 66 20 41 0a 23 75 6e |NSI.#und|ef A.#un|
|00003d10| 64 65 66 20 41 4e 53 49 | 0a 0c 0a 23 69 66 64 65 |def ANSI|...#ifde|
|00003d20| 66 20 55 53 45 5f 52 45 | 41 44 4c 49 4e 45 0a 0a |f USE_RE|ADLINE..|
|00003d30| 2f 2a 20 74 68 69 73 20 | 73 65 63 74 69 6f 6e 20 |/* this |section |
|00003d40| 63 6f 6e 74 61 69 6e 73 | 20 66 75 6e 63 74 69 6f |contains| functio|
|00003d50| 6e 73 20 61 6e 64 20 64 | 65 63 6c 61 72 61 74 69 |ns and d|eclarati|
|00003d60| 6f 6e 73 20 75 73 65 64 | 20 77 69 74 68 20 72 65 |ons used| with re|
|00003d70| 61 64 6c 69 6e 65 28 29 | 20 2a 2f 0a 0a 2f 2a 20 |adline()| */../* |
|00003d80| 74 68 65 20 72 65 61 64 | 6c 69 6e 65 20 69 6e 66 |the read|line inf|
|00003d90| 6f 20 70 61 67 65 73 20 | 6d 61 6b 65 20 74 68 69 |o pages |make thi|
|00003da0| 73 20 63 6c 65 61 72 65 | 72 20 74 68 61 6e 20 61 |s cleare|r than a|
|00003db0| 6e 79 20 63 6f 6d 6d 65 | 6e 74 73 20 70 6f 73 73 |ny comme|nts poss|
|00003dc0| 69 62 6c 79 0a 20 2a 20 | 63 6f 75 6c 64 2c 20 73 |ibly. * |could, s|
|00003dd0| 6f 20 73 65 65 20 74 68 | 65 6d 20 66 6f 72 20 6d |o see th|em for m|
|00003de0| 6f 72 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 0a |ore info|rmation.|
|00003df0| 20 2a 2f 0a 0a 63 68 61 | 72 20 2a 63 6f 6d 6d 61 | */..cha|r *comma|
|00003e00| 6e 64 73 5b 5d 20 3d 20 | 7b 0a 20 20 22 64 65 63 |nds[] = |{. "dec|
|00003e10| 6c 61 72 65 22 2c 0a 20 | 20 22 65 78 70 6c 61 69 |lare",. | "explai|
|00003e20| 6e 22 2c 0a 20 20 22 63 | 61 73 74 22 2c 0a 20 20 |n",. "c|ast",. |
|00003e30| 22 68 65 6c 70 22 2c 0a | 20 20 22 73 65 74 22 2c |"help",.| "set",|
|00003e40| 0a 20 20 22 65 78 69 74 | 22 2c 0a 20 20 22 71 75 |. "exit|",. "qu|
|00003e50| 69 74 22 2c 0a 20 20 4e | 55 4c 4c 0a 7d 3b 0a 0a |it",. N|ULL.};..|
|00003e60| 63 68 61 72 20 2a 6b 65 | 79 77 6f 72 64 73 5b 5d |char *ke|ywords[]|
|00003e70| 20 3d 20 7b 0a 20 20 22 | 66 75 6e 63 74 69 6f 6e | = {. "|function|
|00003e80| 22 2c 0a 20 20 22 72 65 | 74 75 72 6e 69 6e 67 22 |",. "re|turning"|
|00003e90| 2c 0a 20 20 22 61 72 72 | 61 79 22 2c 0a 20 20 22 |,. "arr|ay",. "|
|00003ea0| 70 6f 69 6e 74 65 72 22 | 2c 0a 20 20 22 72 65 66 |pointer"|,. "ref|
|00003eb0| 65 72 65 6e 63 65 22 2c | 0a 20 20 22 6d 65 6d 62 |erence",|. "memb|
|00003ec0| 65 72 22 2c 0a 20 20 22 | 63 6f 6e 73 74 22 2c 0a |er",. "|const",.|
|00003ed0| 20 20 22 76 6f 6c 61 74 | 69 6c 65 22 2c 0a 20 20 | "volat|ile",. |
|00003ee0| 22 6e 6f 61 6c 69 61 73 | 22 2c 0a 20 20 22 73 74 |"noalias|",. "st|
|00003ef0| 72 75 63 74 22 2c 0a 20 | 20 22 75 6e 69 6f 6e 22 |ruct",. | "union"|
|00003f00| 2c 0a 20 20 22 65 6e 75 | 6d 22 2c 0a 20 20 22 63 |,. "enu|m",. "c|
|00003f10| 6c 61 73 73 22 2c 0a 20 | 20 22 65 78 74 65 72 6e |lass",. | "extern|
|00003f20| 22 2c 0a 20 20 22 73 74 | 61 74 69 63 22 2c 0a 20 |",. "st|atic",. |
|00003f30| 20 22 61 75 74 6f 22 2c | 0a 20 20 22 72 65 67 69 | "auto",|. "regi|
|00003f40| 73 74 65 72 22 2c 0a 20 | 20 22 73 68 6f 72 74 22 |ster",. | "short"|
|00003f50| 2c 0a 20 20 22 6c 6f 6e | 67 22 2c 0a 20 20 22 73 |,. "lon|g",. "s|
|00003f60| 69 67 6e 65 64 22 2c 0a | 20 20 22 75 6e 73 69 67 |igned",.| "unsig|
|00003f70| 6e 65 64 22 2c 0a 20 20 | 22 63 68 61 72 22 2c 0a |ned",. |"char",.|
|00003f80| 20 20 22 66 6c 6f 61 74 | 22 2c 0a 20 20 22 64 6f | "float|",. "do|
|00003f90| 75 62 6c 65 22 2c 0a 20 | 20 22 76 6f 69 64 22 2c |uble",. | "void",|
|00003fa0| 0a 20 20 4e 55 4c 4c 0a | 7d 3b 0a 0a 63 68 61 72 |. NULL.|};..char|
|00003fb0| 20 2a 6f 70 74 69 6f 6e | 73 5b 5d 20 3d 20 7b 0a | *option|s[] = {.|
|00003fc0| 20 20 22 6f 70 74 69 6f | 6e 73 22 2c 0a 20 20 22 | "optio|ns",. "|
|00003fd0| 63 72 65 61 74 65 22 2c | 0a 20 20 22 6e 6f 63 72 |create",|. "nocr|
|00003fe0| 65 61 74 65 22 2c 0a 20 | 20 22 70 72 6f 6d 70 74 |eate",. | "prompt|
|00003ff0| 22 2c 0a 20 20 22 6e 6f | 70 72 6f 6d 70 74 22 2c |",. "no|prompt",|
|00004000| 0a 23 69 66 20 30 0a 20 | 20 22 69 6e 74 65 72 61 |.#if 0. | "intera|
|00004010| 63 74 69 76 65 22 2c 0a | 20 20 22 6e 6f 69 6e 74 |ctive",.| "noint|
|00004020| 65 72 61 63 74 69 76 65 | 22 2c 0a 23 65 6e 64 69 |eractive|",.#endi|
|00004030| 66 0a 20 20 22 72 69 74 | 63 68 69 65 22 2c 0a 20 |f. "rit|chie",. |
|00004040| 20 22 70 72 65 61 6e 73 | 69 22 2c 0a 20 20 22 61 | "preans|i",. "a|
|00004050| 6e 73 69 22 2c 0a 20 20 | 22 63 70 6c 75 73 70 6c |nsi",. |"cpluspl|
|00004060| 75 73 22 2c 0a 20 20 4e | 55 4c 4c 0a 7d 3b 0a 0a |us",. N|ULL.};..|
|00004070| 2f 2a 20 41 20 73 74 61 | 74 69 63 20 76 61 72 69 |/* A sta|tic vari|
|00004080| 61 62 6c 65 20 66 6f 72 | 20 68 6f 6c 64 69 6e 67 |able for| holding|
|00004090| 20 74 68 65 20 6c 69 6e | 65 2e 20 2a 2f 0a 73 74 | the lin|e. */.st|
|000040a0| 61 74 69 63 20 63 68 61 | 72 20 2a 6c 69 6e 65 5f |atic cha|r *line_|
|000040b0| 72 65 61 64 20 3d 20 4e | 55 4c 4c 3b 0a 0a 2f 2a |read = N|ULL;../*|
|000040c0| 20 52 65 61 64 20 61 20 | 73 74 72 69 6e 67 2c 20 | Read a |string, |
|000040d0| 61 6e 64 20 72 65 74 75 | 72 6e 20 61 20 70 6f 69 |and retu|rn a poi|
|000040e0| 6e 74 65 72 20 74 6f 20 | 69 74 2e 20 20 52 65 74 |nter to |it. Ret|
|000040f0| 75 72 6e 73 20 4e 55 4c | 4c 20 6f 6e 20 45 4f 46 |urns NUL|L on EOF|
|00004100| 2e 20 2a 2f 0a 63 68 61 | 72 20 2a 20 67 65 74 6c |. */.cha|r * getl|
|00004110| 69 6e 65 20 28 29 0a 7b | 0a 20 20 2f 2a 20 49 66 |ine ().{|. /* If|
|00004120| 20 74 68 65 20 62 75 66 | 66 65 72 20 68 61 73 20 | the buf|fer has |
|00004130| 61 6c 72 65 61 64 79 20 | 62 65 65 6e 20 61 6c 6c |already |been all|
|00004140| 6f 63 61 74 65 64 2c 20 | 72 65 74 75 72 6e 20 74 |ocated, |return t|
|00004150| 68 65 20 6d 65 6d 6f 72 | 79 0a 20 20 20 20 20 74 |he memor|y. t|
|00004160| 6f 20 74 68 65 20 66 72 | 65 65 20 70 6f 6f 6c 2e |o the fr|ee pool.|
|00004170| 20 2a 2f 0a 20 20 69 66 | 20 28 6c 69 6e 65 5f 72 | */. if| (line_r|
|00004180| 65 61 64 20 21 3d 20 4e | 55 4c 4c 29 0a 20 20 20 |ead != N|ULL). |
|00004190| 20 7b 0a 20 20 20 20 20 | 20 66 72 65 65 20 28 6c | {. | free (l|
|000041a0| 69 6e 65 5f 72 65 61 64 | 29 3b 0a 20 20 20 20 20 |ine_read|);. |
|000041b0| 20 6c 69 6e 65 5f 72 65 | 61 64 20 3d 20 4e 55 4c | line_re|ad = NUL|
|000041c0| 4c 3b 0a 20 20 20 20 7d | 0a 0a 20 20 2f 2a 20 47 |L;. }|.. /* G|
|000041d0| 65 74 20 61 20 6c 69 6e | 65 20 66 72 6f 6d 20 74 |et a lin|e from t|
|000041e0| 68 65 20 75 73 65 72 2e | 20 2a 2f 0a 20 20 6c 69 |he user.| */. li|
|000041f0| 6e 65 5f 72 65 61 64 20 | 3d 20 72 65 61 64 6c 69 |ne_read |= readli|
|00004200| 6e 65 20 28 63 64 65 63 | 6c 5f 70 72 6f 6d 70 74 |ne (cdec|l_prompt|
|00004210| 29 3b 0a 0a 20 20 2f 2a | 20 49 66 20 74 68 65 20 |);.. /*| If the |
|00004220| 6c 69 6e 65 20 68 61 73 | 20 61 6e 79 20 74 65 78 |line has| any tex|
|00004230| 74 20 69 6e 20 69 74 2c | 20 73 61 76 65 20 69 74 |t in it,| save it|
|00004240| 20 6f 6e 20 74 68 65 20 | 68 69 73 74 6f 72 79 2e | on the |history.|
|00004250| 20 2a 2f 0a 20 20 69 66 | 20 28 6c 69 6e 65 5f 72 | */. if| (line_r|
|00004260| 65 61 64 20 26 26 20 2a | 6c 69 6e 65 5f 72 65 61 |ead && *|line_rea|
|00004270| 64 29 0a 20 20 20 20 61 | 64 64 5f 68 69 73 74 6f |d). a|dd_histo|
|00004280| 72 79 20 28 6c 69 6e 65 | 5f 72 65 61 64 29 3b 0a |ry (line|_read);.|
|00004290| 0a 20 20 72 65 74 75 72 | 6e 20 28 6c 69 6e 65 5f |. retur|n (line_|
|000042a0| 72 65 61 64 29 3b 0a 7d | 0a 0a 63 68 61 72 20 2a |read);.}|..char *|
|000042b0| 2a 20 61 74 74 65 6d 70 | 74 5f 63 6f 6d 70 6c 65 |* attemp|t_comple|
|000042c0| 74 69 6f 6e 28 63 68 61 | 72 20 2a 74 65 78 74 2c |tion(cha|r *text,|
|000042d0| 20 69 6e 74 20 73 74 61 | 72 74 2c 20 69 6e 74 20 | int sta|rt, int |
|000042e0| 65 6e 64 29 0a 7b 0a 20 | 20 63 68 61 72 20 2a 2a |end).{. | char **|
|000042f0| 6d 61 74 63 68 65 73 20 | 3d 20 4e 55 4c 4c 3b 0a |matches |= NULL;.|
|00004300| 0a 20 20 69 66 20 28 73 | 74 61 72 74 20 3d 3d 20 |. if (s|tart == |
|00004310| 30 29 20 6d 61 74 63 68 | 65 73 20 3d 20 63 6f 6d |0) match|es = com|
|00004320| 70 6c 65 74 69 6f 6e 5f | 6d 61 74 63 68 65 73 28 |pletion_|matches(|
|00004330| 74 65 78 74 2c 20 63 6f | 6d 6d 61 6e 64 5f 63 6f |text, co|mmand_co|
|00004340| 6d 70 6c 65 74 69 6f 6e | 29 3b 0a 0a 20 20 72 65 |mpletion|);.. re|
|00004350| 74 75 72 6e 20 6d 61 74 | 63 68 65 73 3b 0a 7d 0a |turn mat|ches;.}.|
|00004360| 0a 63 68 61 72 20 2a 20 | 63 6f 6d 6d 61 6e 64 5f |.char * |command_|
|00004370| 63 6f 6d 70 6c 65 74 69 | 6f 6e 28 63 68 61 72 20 |completi|on(char |
|00004380| 2a 74 65 78 74 2c 20 69 | 6e 74 20 66 6c 61 67 29 |*text, i|nt flag)|
|00004390| 0a 7b 0a 20 20 73 74 61 | 74 69 63 20 69 6e 74 20 |.{. sta|tic int |
|000043a0| 69 6e 64 65 78 2c 20 6c | 65 6e 3b 0a 20 20 63 68 |index, l|en;. ch|
|000043b0| 61 72 20 2a 63 6f 6d 6d | 61 6e 64 3b 0a 0a 20 20 |ar *comm|and;.. |
|000043c0| 69 66 20 28 21 66 6c 61 | 67 29 20 7b 0a 20 20 20 |if (!fla|g) {. |
|000043d0| 20 69 6e 64 65 78 20 3d | 20 30 3b 0a 20 20 20 20 | index =| 0;. |
|000043e0| 6c 65 6e 20 3d 20 73 74 | 72 6c 65 6e 28 74 65 78 |len = st|rlen(tex|
|000043f0| 74 29 3b 0a 20 20 7d 0a | 0a 20 20 77 68 69 6c 65 |t);. }.|. while|
|00004400| 20 28 63 6f 6d 6d 61 6e | 64 20 3d 20 63 6f 6d 6d | (comman|d = comm|
|00004410| 61 6e 64 73 5b 69 6e 64 | 65 78 5d 29 20 7b 0a 20 |ands[ind|ex]) {. |
|00004420| 20 20 20 69 6e 64 65 78 | 2b 2b 3b 0a 20 20 20 20 | index|++;. |
|00004430| 69 66 20 28 21 73 74 72 | 6e 63 6d 70 28 63 6f 6d |if (!str|ncmp(com|
|00004440| 6d 61 6e 64 2c 20 74 65 | 78 74 2c 20 6c 65 6e 29 |mand, te|xt, len)|
|00004450| 29 20 72 65 74 75 72 6e | 20 73 74 72 64 75 70 28 |) return| strdup(|
|00004460| 63 6f 6d 6d 61 6e 64 29 | 3b 0a 20 20 7d 0a 20 20 |command)|;. }. |
|00004470| 72 65 74 75 72 6e 20 4e | 55 4c 4c 3b 0a 7d 0a 0a |return N|ULL;.}..|
|00004480| 63 68 61 72 20 2a 20 6b | 65 79 77 6f 72 64 5f 63 |char * k|eyword_c|
|00004490| 6f 6d 70 6c 65 74 69 6f | 6e 28 63 68 61 72 20 2a |ompletio|n(char *|
|000044a0| 74 65 78 74 2c 20 69 6e | 74 20 66 6c 61 67 29 0a |text, in|t flag).|
|000044b0| 7b 0a 20 20 73 74 61 74 | 69 63 20 69 6e 74 20 69 |{. stat|ic int i|
|000044c0| 6e 64 65 78 2c 20 6c 65 | 6e 2c 20 73 65 74 2c 20 |ndex, le|n, set, |
|000044d0| 69 6e 74 6f 3b 0a 20 20 | 63 68 61 72 20 2a 6b 65 |into;. |char *ke|
|000044e0| 79 77 6f 72 64 2c 20 2a | 6f 70 74 69 6f 6e 3b 0a |yword, *|option;.|
|000044f0| 0a 20 20 69 66 20 28 21 | 66 6c 61 67 29 20 7b 0a |. if (!|flag) {.|
|00004500| 20 20 20 20 69 6e 64 65 | 78 20 3d 20 30 3b 0a 20 | inde|x = 0;. |
|00004510| 20 20 20 6c 65 6e 20 3d | 20 73 74 72 6c 65 6e 28 | len =| strlen(|
|00004520| 74 65 78 74 29 3b 0a 20 | 20 20 20 2f 2a 20 63 6f |text);. | /* co|
|00004530| 6d 70 6c 65 74 69 6f 6e | 20 77 6f 72 6b 73 20 64 |mpletion| works d|
|00004540| 69 66 66 65 72 65 6e 74 | 6c 79 20 69 66 20 74 68 |ifferent|ly if th|
|00004550| 65 20 6c 69 6e 65 20 62 | 65 67 69 6e 73 20 77 69 |e line b|egins wi|
|00004560| 74 68 20 22 73 65 74 22 | 20 2a 2f 0a 20 20 20 20 |th "set"| */. |
|00004570| 73 65 74 20 3d 20 21 73 | 74 72 6e 63 6d 70 28 72 |set = !s|trncmp(r|
|00004580| 6c 5f 6c 69 6e 65 5f 62 | 75 66 66 65 72 2c 20 22 |l_line_b|uffer, "|
|00004590| 73 65 74 22 2c 20 33 29 | 3b 0a 20 20 20 20 69 6e |set", 3)|;. in|
|000045a0| 74 6f 20 3d 20 30 3b 0a | 20 20 7d 0a 0a 20 20 69 |to = 0;.| }.. i|
|000045b0| 66 20 28 73 65 74 29 20 | 7b 0a 20 20 20 20 77 68 |f (set) |{. wh|
|000045c0| 69 6c 65 20 28 6f 70 74 | 69 6f 6e 20 3d 20 6f 70 |ile (opt|ion = op|
|000045d0| 74 69 6f 6e 73 5b 69 6e | 64 65 78 5d 29 20 7b 0a |tions[in|dex]) {.|
|000045e0| 20 20 20 20 20 20 69 6e | 64 65 78 2b 2b 3b 0a 20 | in|dex++;. |
|000045f0| 20 20 20 20 20 69 66 20 | 28 21 73 74 72 6e 63 6d | if |(!strncm|
|00004600| 70 28 6f 70 74 69 6f 6e | 2c 20 74 65 78 74 2c 20 |p(option|, text, |
|00004610| 6c 65 6e 29 29 20 72 65 | 74 75 72 6e 20 73 74 72 |len)) re|turn str|
|00004620| 64 75 70 28 6f 70 74 69 | 6f 6e 29 3b 0a 20 20 20 |dup(opti|on);. |
|00004630| 20 7d 0a 20 20 7d 20 65 | 6c 73 65 20 7b 0a 20 20 | }. } e|lse {. |
|00004640| 20 20 2f 2a 20 68 61 6e | 64 6c 65 20 22 69 6e 74 | /* han|dle "int|
|00004650| 22 20 61 6e 64 20 22 69 | 6e 74 6f 22 20 61 73 20 |" and "i|nto" as |
|00004660| 73 70 65 63 69 61 6c 20 | 63 61 73 65 73 20 2a 2f |special |cases */|
|00004670| 0a 20 20 20 20 69 66 20 | 28 21 69 6e 74 6f 29 20 |. if |(!into) |
|00004680| 7b 0a 20 20 20 20 20 20 | 69 6e 74 6f 20 3d 20 31 |{. |into = 1|
|00004690| 3b 0a 20 20 20 20 20 20 | 69 66 20 28 21 73 74 72 |;. |if (!str|
|000046a0| 6e 63 6d 70 28 74 65 78 | 74 2c 20 22 69 6e 74 6f |ncmp(tex|t, "into|
|000046b0| 22 2c 20 6c 65 6e 29 20 | 26 26 20 73 74 72 6e 63 |", len) |&& strnc|
|000046c0| 6d 70 28 74 65 78 74 2c | 20 22 69 6e 74 22 2c 20 |mp(text,| "int", |
|000046d0| 6c 65 6e 29 29 0a 20 20 | 20 20 20 20 20 20 72 65 |len)). | re|
|000046e0| 74 75 72 6e 20 73 74 72 | 64 75 70 28 22 69 6e 74 |turn str|dup("int|
|000046f0| 6f 22 29 3b 0a 20 20 20 | 20 20 20 69 66 20 28 73 |o");. | if (s|
|00004700| 74 72 6e 63 6d 70 28 74 | 65 78 74 2c 20 22 69 6e |trncmp(t|ext, "in|
|00004710| 74 22 2c 20 6c 65 6e 29 | 29 20 72 65 74 75 72 6e |t", len)|) return|
|00004720| 20 6b 65 79 77 6f 72 64 | 5f 63 6f 6d 70 6c 65 74 | keyword|_complet|
|00004730| 69 6f 6e 28 74 65 78 74 | 2c 20 69 6e 74 6f 29 3b |ion(text|, into);|
|00004740| 0a 20 20 20 20 20 20 2f | 2a 20 6e 6f 72 6d 61 6c |. /|* normal|
|00004750| 6c 79 20 22 69 6e 74 22 | 20 61 6e 64 20 22 69 6e |ly "int"| and "in|
|00004760| 74 6f 22 20 77 6f 75 6c | 64 20 63 6f 6e 66 6c 69 |to" woul|d confli|
|00004770| 63 74 20 77 69 74 68 20 | 6f 6e 65 20 61 6e 6f 74 |ct with |one anot|
|00004780| 68 65 72 20 77 68 65 6e | 0a 20 20 20 20 20 20 20 |her when|. |
|00004790| 2a 20 63 6f 6d 70 6c 65 | 74 69 6e 67 3b 20 63 64 |* comple|ting; cd|
|000047a0| 65 63 6c 20 74 72 69 65 | 73 20 74 6f 20 67 75 65 |ecl trie|s to gue|
|000047b0| 73 73 20 77 68 69 63 68 | 20 6f 6e 65 20 79 6f 75 |ss which| one you|
|000047c0| 20 77 61 6e 74 65 64 2c | 20 61 6e 64 20 69 74 0a | wanted,| and it.|
|000047d0| 20 20 20 20 20 20 20 2a | 20 61 6c 77 61 79 73 20 | *| always |
|000047e0| 67 75 65 73 73 65 73 20 | 63 6f 72 72 65 63 74 6c |guesses |correctl|
|000047f0| 79 0a 20 20 20 20 20 20 | 20 2a 2f 0a 20 20 20 20 |y. | */. |
|00004800| 20 20 69 66 20 28 21 73 | 74 72 6e 63 6d 70 28 72 | if (!s|trncmp(r|
|00004810| 6c 5f 6c 69 6e 65 5f 62 | 75 66 66 65 72 2c 20 22 |l_line_b|uffer, "|
|00004820| 63 61 73 74 22 2c 20 34 | 29 0a 20 20 20 20 20 20 |cast", 4|). |
|00004830| 20 20 20 20 26 26 20 21 | 73 74 72 73 74 72 28 72 | && !|strstr(r|
|00004840| 6c 5f 6c 69 6e 65 5f 62 | 75 66 66 65 72 2c 20 22 |l_line_b|uffer, "|
|00004850| 69 6e 74 6f 22 29 29 0a | 20 20 20 20 20 20 20 20 |into")).| |
|00004860| 72 65 74 75 72 6e 20 73 | 74 72 64 75 70 28 22 69 |return s|trdup("i|
|00004870| 6e 74 6f 22 29 3b 0a 20 | 20 20 20 20 20 65 6c 73 |nto");. | els|
|00004880| 65 0a 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e |e. | return|
|00004890| 20 73 74 72 64 75 70 28 | 22 69 6e 74 22 29 3b 0a | strdup(|"int");.|
|000048a0| 20 20 20 20 7d 20 65 6c | 73 65 20 77 68 69 6c 65 | } el|se while|
|000048b0| 20 28 6b 65 79 77 6f 72 | 64 20 3d 20 6b 65 79 77 | (keywor|d = keyw|
|000048c0| 6f 72 64 73 5b 69 6e 64 | 65 78 5d 29 20 7b 0a 20 |ords[ind|ex]) {. |
|000048d0| 20 20 20 20 20 69 6e 64 | 65 78 2b 2b 3b 0a 20 20 | ind|ex++;. |
|000048e0| 20 20 20 20 69 66 20 28 | 21 73 74 72 6e 63 6d 70 | if (|!strncmp|
|000048f0| 28 6b 65 79 77 6f 72 64 | 2c 20 74 65 78 74 2c 20 |(keyword|, text, |
|00004900| 6c 65 6e 29 29 20 72 65 | 74 75 72 6e 20 73 74 72 |len)) re|turn str|
|00004910| 64 75 70 28 6b 65 79 77 | 6f 72 64 29 3b 0a 20 20 |dup(keyw|ord);. |
|00004920| 20 20 7d 0a 20 20 7d 0a | 20 20 72 65 74 75 72 6e | }. }.| return|
|00004930| 20 4e 55 4c 4c 3b 0a 7d | 0a 23 65 6e 64 69 66 20 | NULL;.}|.#endif |
|00004940| 2f 2a 20 55 53 45 5f 52 | 45 41 44 4c 49 4e 45 20 |/* USE_R|EADLINE |
|00004950| 2a 2f 0a 0c 0a 2f 2a 20 | 57 72 69 74 65 20 6f 75 |*/.../* |Write ou|
|00004960| 74 20 61 20 6d 65 73 73 | 61 67 65 20 61 62 6f 75 |t a mess|age abou|
|00004970| 74 20 73 6f 6d 65 74 68 | 69 6e 67 20 2a 2f 0a 2f |t someth|ing */./|
|00004980| 2a 20 62 65 69 6e 67 20 | 75 6e 73 75 70 70 6f 72 |* being |unsuppor|
|00004990| 74 65 64 2c 20 70 6f 73 | 73 69 62 6c 79 20 77 69 |ted, pos|sibly wi|
|000049a0| 74 68 20 61 20 68 69 6e | 74 2e 20 2a 2f 0a 76 6f |th a hin|t. */.vo|
|000049b0| 69 64 20 75 6e 73 75 70 | 70 28 73 2c 68 69 6e 74 |id unsup|p(s,hint|
|000049c0| 29 0a 63 68 61 72 20 2a | 73 2c 2a 68 69 6e 74 3b |).char *|s,*hint;|
|000049d0| 0a 7b 0a 20 20 20 20 6e | 6f 74 73 75 70 70 6f 72 |.{. n|otsuppor|
|000049e0| 74 65 64 28 22 22 2c 20 | 73 2c 20 4e 75 6c 6c 43 |ted("", |s, NullC|
|000049f0| 50 29 3b 0a 20 20 20 20 | 69 66 20 28 68 69 6e 74 |P);. |if (hint|
|00004a00| 29 0a 09 28 76 6f 69 64 | 29 20 66 70 72 69 6e 74 |)..(void|) fprint|
|00004a10| 66 28 73 74 64 65 72 72 | 2c 20 22 5c 74 28 6d 61 |f(stderr|, "\t(ma|
|00004a20| 79 62 65 20 79 6f 75 20 | 6d 65 61 6e 20 5c 22 25 |ybe you |mean \"%|
|00004a30| 73 5c 22 29 5c 6e 22 2c | 20 68 69 6e 74 29 3b 0a |s\")\n",| hint);.|
|00004a40| 7d 0a 0a 2f 2a 20 57 72 | 69 74 65 20 6f 75 74 20 |}../* Wr|ite out |
|00004a50| 61 20 6d 65 73 73 61 67 | 65 20 61 62 6f 75 74 20 |a messag|e about |
|00004a60| 73 6f 6d 65 74 68 69 6e | 67 20 2a 2f 0a 2f 2a 20 |somethin|g */./* |
|00004a70| 62 65 69 6e 67 20 75 6e | 73 75 70 70 6f 72 74 65 |being un|supporte|
|00004a80| 64 20 6f 6e 20 61 20 70 | 61 72 74 69 63 75 6c 61 |d on a p|articula|
|00004a90| 72 20 63 6f 6d 70 69 6c | 65 72 2e 20 2a 2f 0a 76 |r compil|er. */.v|
|00004aa0| 6f 69 64 20 6e 6f 74 73 | 75 70 70 6f 72 74 65 64 |oid nots|upported|
|00004ab0| 28 63 6f 6d 70 69 6c 65 | 72 2c 20 74 79 70 65 31 |(compile|r, type1|
|00004ac0| 2c 20 74 79 70 65 32 29 | 0a 63 68 61 72 20 2a 63 |, type2)|.char *c|
|00004ad0| 6f 6d 70 69 6c 65 72 2c | 20 2a 74 79 70 65 31 2c |ompiler,| *type1,|
|00004ae0| 20 2a 74 79 70 65 32 3b | 0a 7b 0a 20 20 20 20 69 | *type2;|.{. i|
|00004af0| 66 20 28 74 79 70 65 32 | 29 0a 09 28 76 6f 69 64 |f (type2|)..(void|
|00004b00| 29 20 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |) fprint|f(stderr|
|00004b10| 2c 0a 09 20 20 20 20 22 | 57 61 72 6e 69 6e 67 3a |,.. "|Warning:|
|00004b20| 20 55 6e 73 75 70 70 6f | 72 74 65 64 20 69 6e 25 | Unsuppo|rted in%|
|00004b30| 73 20 43 25 73 20 2d 2d | 20 27 25 73 27 20 77 69 |s C%s --| '%s' wi|
|00004b40| 74 68 20 27 25 73 27 5c | 6e 22 2c 0a 09 20 20 20 |th '%s'\|n",.. |
|00004b50| 20 63 6f 6d 70 69 6c 65 | 72 2c 20 43 70 6c 75 73 | compile|r, Cplus|
|00004b60| 70 6c 75 73 46 6c 61 67 | 20 3f 20 22 2b 2b 22 20 |plusFlag| ? "++" |
|00004b70| 3a 20 22 22 2c 20 74 79 | 70 65 31 2c 20 74 79 70 |: "", ty|pe1, typ|
|00004b80| 65 32 29 3b 0a 20 20 20 | 20 65 6c 73 65 0a 09 28 |e2);. | else..(|
|00004b90| 76 6f 69 64 29 20 66 70 | 72 69 6e 74 66 28 73 74 |void) fp|rintf(st|
|00004ba0| 64 65 72 72 2c 0a 09 20 | 20 20 20 22 57 61 72 6e |derr,.. | "Warn|
|00004bb0| 69 6e 67 3a 20 55 6e 73 | 75 70 70 6f 72 74 65 64 |ing: Uns|upported|
|00004bc0| 20 69 6e 25 73 20 43 25 | 73 20 2d 2d 20 27 25 73 | in%s C%|s -- '%s|
|00004bd0| 27 5c 6e 22 2c 0a 09 20 | 20 20 20 63 6f 6d 70 69 |'\n",.. | compi|
|00004be0| 6c 65 72 2c 20 43 70 6c | 75 73 70 6c 75 73 46 6c |ler, Cpl|usplusFl|
|00004bf0| 61 67 20 3f 20 22 2b 2b | 22 20 3a 20 22 22 2c 20 |ag ? "++|" : "", |
|00004c00| 74 79 70 65 31 29 3b 0a | 7d 0a 0a 2f 2a 20 43 61 |type1);.|}../* Ca|
|00004c10| 6c 6c 65 64 20 62 79 20 | 74 68 65 20 79 61 63 63 |lled by |the yacc|
|00004c20| 20 67 72 61 6d 6d 61 72 | 20 2a 2f 0a 76 6f 69 64 | grammar| */.void|
|00004c30| 20 79 79 65 72 72 6f 72 | 28 73 29 0a 63 68 61 72 | yyerror|(s).char|
|00004c40| 20 2a 73 3b 0a 7b 0a 20 | 20 20 20 28 76 6f 69 64 | *s;.{. | (void|
|00004c50| 29 20 70 72 69 6e 74 66 | 28 22 25 73 5c 6e 22 2c |) printf|("%s\n",|
|00004c60| 73 29 3b 0a 20 20 20 20 | 44 65 62 75 67 28 28 73 |s);. |Debug((s|
|00004c70| 74 64 6f 75 74 2c 20 22 | 79 79 63 68 61 72 3d 25 |tdout, "|yychar=%|
|00004c80| 64 5c 6e 22 2c 20 79 79 | 63 68 61 72 29 29 3b 0a |d\n", yy|char));.|
|00004c90| 7d 0a 0a 2f 2a 20 43 61 | 6c 6c 65 64 20 62 79 20 |}../* Ca|lled by |
|00004ca0| 74 68 65 20 79 61 63 63 | 20 67 72 61 6d 6d 61 72 |the yacc| grammar|
|00004cb0| 20 2a 2f 0a 69 6e 74 20 | 79 79 77 72 61 70 28 29 | */.int |yywrap()|
|00004cc0| 0a 7b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 31 3b |.{. r|eturn 1;|
|00004cd0| 0a 7d 0a 0a 2f 2a 0a 20 | 2a 20 53 75 70 70 6f 72 |.}../*. |* Suppor|
|00004ce0| 74 20 66 6f 72 20 64 79 | 6e 61 6d 69 63 20 73 74 |t for dy|namic st|
|00004cf0| 72 69 6e 67 73 3a 0a 20 | 2a 20 63 61 74 28 29 20 |rings:. |* cat() |
|00004d00| 63 72 65 61 74 65 73 20 | 61 20 73 74 72 69 6e 67 |creates |a string|
|00004d10| 20 66 72 6f 6d 20 74 68 | 65 20 63 6f 6e 63 61 74 | from th|e concat|
|00004d20| 65 6e 61 74 69 6f 6e 0a | 20 2a 20 6f 66 20 61 20 |enation.| * of a |
|00004d30| 6e 75 6c 6c 20 74 65 72 | 6d 69 6e 61 74 65 64 20 |null ter|minated |
|00004d40| 6c 69 73 74 20 6f 66 20 | 69 6e 70 75 74 20 73 74 |list of |input st|
|00004d50| 72 69 6e 67 73 2e 0a 20 | 2a 20 54 68 65 20 69 6e |rings.. |* The in|
|00004d60| 70 75 74 20 73 74 72 69 | 6e 67 73 20 61 72 65 20 |put stri|ngs are |
|00004d70| 66 72 65 65 28 29 27 64 | 20 62 79 20 63 61 74 28 |free()'d| by cat(|
|00004d80| 29 0a 20 2a 20 28 73 6f | 20 74 68 65 79 20 62 65 |). * (so| they be|
|00004d90| 74 74 65 72 20 68 61 76 | 65 20 62 65 65 6e 20 6d |tter hav|e been m|
|00004da0| 61 6c 6c 6f 63 28 29 27 | 64 29 2e 0a 20 2a 0a 20 |alloc()'|d).. *. |
|00004db0| 2a 20 74 68 65 20 64 69 | 66 66 65 72 65 6e 74 20 |* the di|fferent |
|00004dc0| 6d 65 74 68 6f 64 73 20 | 6f 66 20 3c 73 74 64 61 |methods |of <stda|
|00004dd0| 72 67 2e 68 3e 20 61 6e | 64 0a 20 2a 20 3c 76 61 |rg.h> an|d. * <va|
|00004de0| 72 61 72 67 2e 68 3e 20 | 61 72 65 20 68 61 6e 64 |rarg.h> |are hand|
|00004df0| 6c 65 64 20 77 69 74 68 | 69 6e 20 74 68 65 73 65 |led with|in these|
|00004e00| 20 6d 61 63 72 6f 73 0a | 20 2a 2f 0a 23 69 66 20 | macros.| */.#if |
|00004e10| 5f 5f 53 54 44 43 5f 5f | 0a 23 20 20 64 65 66 69 |__STDC__|.# defi|
|00004e20| 6e 65 20 56 41 5f 44 43 | 4c 28 74 79 70 65 2c 76 |ne VA_DC|L(type,v|
|00004e30| 61 72 29 09 09 28 74 79 | 70 65 20 76 61 72 2c 2e |ar)..(ty|pe var,.|
|00004e40| 2e 2e 29 0a 23 20 20 64 | 65 66 69 6e 65 20 56 41 |..).# d|efine VA|
|00004e50| 5f 53 54 41 52 54 28 6c | 69 73 74 2c 76 61 72 2c |_START(l|ist,var,|
|00004e60| 74 79 70 65 29 09 28 28 | 76 61 5f 73 74 61 72 74 |type).((|va_start|
|00004e70| 28 6c 69 73 74 2c 76 61 | 72 29 29 20 2c 20 28 76 |(list,va|r)) , (v|
|00004e80| 61 72 29 29 0a 23 65 6c | 73 65 0a 23 69 66 20 64 |ar)).#el|se.#if d|
|00004e90| 65 66 69 6e 65 64 28 44 | 4f 53 29 0a 23 20 20 64 |efined(D|OS).# d|
|00004ea0| 65 66 69 6e 65 20 56 41 | 5f 44 43 4c 28 74 79 70 |efine VA|_DCL(typ|
|00004eb0| 65 2c 76 61 72 29 09 09 | 28 76 61 72 2c 2e 2e 2e |e,var)..|(var,...|
|00004ec0| 29 20 74 79 70 65 20 76 | 61 72 3b 0a 23 20 20 64 |) type v|ar;.# d|
|00004ed0| 65 66 69 6e 65 20 56 41 | 5f 53 54 41 52 54 28 6c |efine VA|_START(l|
|00004ee0| 69 73 74 2c 76 61 72 2c | 74 79 70 65 29 09 28 28 |ist,var,|type).((|
|00004ef0| 76 61 5f 73 74 61 72 74 | 28 6c 69 73 74 2c 76 61 |va_start|(list,va|
|00004f00| 72 29 29 20 2c 20 28 76 | 61 72 29 29 0a 23 65 6c |r)) , (v|ar)).#el|
|00004f10| 73 65 0a 23 69 66 6e 64 | 65 66 20 4e 4f 56 41 52 |se.#ifnd|ef NOVAR|
|00004f20| 41 52 47 53 0a 23 20 64 | 65 66 69 6e 65 20 56 41 |ARGS.# d|efine VA|
|00004f30| 5f 44 43 4c 28 74 79 70 | 65 2c 76 61 72 29 09 09 |_DCL(typ|e,var)..|
|00004f40| 28 76 61 5f 61 6c 69 73 | 74 29 20 76 61 5f 64 63 |(va_alis|t) va_dc|
|00004f50| 6c 0a 23 20 64 65 66 69 | 6e 65 20 56 41 5f 53 54 |l.# defi|ne VA_ST|
|00004f60| 41 52 54 28 6c 69 73 74 | 2c 76 61 72 2c 74 79 70 |ART(list|,var,typ|
|00004f70| 65 29 09 28 28 76 61 5f | 73 74 61 72 74 28 6c 69 |e).((va_|start(li|
|00004f80| 73 74 29 29 20 2c 20 76 | 61 5f 61 72 67 28 6c 69 |st)) , v|a_arg(li|
|00004f90| 73 74 2c 74 79 70 65 29 | 29 0a 23 65 6c 73 65 0a |st,type)|).#else.|
|00004fa0| 20 20 20 2f 2a 0a 20 20 | 20 20 2a 09 69 74 20 69 | /*. | *.it i|
|00004fb0| 73 20 61 73 73 75 6d 65 | 64 20 68 65 72 65 20 74 |s assume|d here t|
|00004fc0| 68 61 74 20 6d 61 63 68 | 69 6e 65 73 20 77 68 69 |hat mach|ines whi|
|00004fd0| 63 68 20 64 6f 6e 27 74 | 20 68 61 76 65 20 65 69 |ch don't| have ei|
|00004fe0| 74 68 65 72 0a 20 20 20 | 20 2a 09 3c 76 61 72 61 |ther. | *.<vara|
|00004ff0| 72 67 73 2e 68 3e 20 6f | 72 20 3c 73 74 64 61 72 |rgs.h> o|r <stdar|
|00005000| 67 2e 68 3e 20 77 69 6c | 6c 20 70 75 74 20 69 74 |g.h> wil|l put it|
|00005010| 73 20 61 72 67 75 6d 65 | 6e 74 73 20 6f 6e 0a 20 |s argume|nts on. |
|00005020| 20 20 20 2a 09 74 68 65 | 20 73 74 61 63 6b 20 69 | *.the| stack i|
|00005030| 6e 20 74 68 65 20 22 75 | 73 75 61 6c 22 20 77 61 |n the "u|sual" wa|
|00005040| 79 20 61 6e 64 20 63 6f | 6e 73 65 71 75 65 6e 74 |y and co|nsequent|
|00005050| 6c 79 20 63 61 6e 20 67 | 72 61 62 0a 20 20 20 20 |ly can g|rab. |
|00005060| 2a 09 74 68 65 20 61 72 | 67 75 6d 65 6e 74 73 20 |*.the ar|guments |
|00005070| 75 73 69 6e 67 20 74 68 | 65 20 22 74 61 6b 65 20 |using th|e "take |
|00005080| 74 68 65 20 61 64 64 72 | 65 73 73 20 6f 66 20 74 |the addr|ess of t|
|00005090| 68 65 20 66 69 72 73 74 | 0a 20 20 20 20 2a 09 70 |he first|. *.p|
|000050a0| 61 72 61 6d 65 74 65 72 | 20 61 6e 64 20 69 6e 63 |arameter| and inc|
|000050b0| 72 65 6d 65 6e 74 20 62 | 79 20 73 69 7a 65 6f 66 |rement b|y sizeof|
|000050c0| 22 20 74 72 69 63 6b 2e | 0a 20 20 20 20 2a 2f 0a |" trick.|. */.|
|000050d0| 23 20 64 65 66 69 6e 65 | 20 56 41 5f 44 43 4c 28 |# define| VA_DCL(|
|000050e0| 74 79 70 65 2c 76 61 72 | 29 09 09 28 76 61 72 29 |type,var|)..(var)|
|000050f0| 20 74 79 70 65 20 76 61 | 72 3b 0a 23 20 64 65 66 | type va|r;.# def|
|00005100| 69 6e 65 20 56 41 5f 53 | 54 41 52 54 28 6c 69 73 |ine VA_S|TART(lis|
|00005110| 74 2c 76 61 72 2c 74 79 | 70 65 29 09 28 6c 69 73 |t,var,ty|pe).(lis|
|00005120| 74 20 3d 20 28 76 61 5f | 6c 69 73 74 29 26 28 76 |t = (va_|list)&(v|
|00005130| 61 72 29 20 2c 20 28 76 | 61 72 29 29 0a 23 20 64 |ar) , (v|ar)).# d|
|00005140| 65 66 69 6e 65 20 76 61 | 5f 61 72 67 28 6c 69 73 |efine va|_arg(lis|
|00005150| 74 2c 74 79 70 65 29 09 | 09 28 28 74 79 70 65 20 |t,type).|.((type |
|00005160| 2a 29 28 6c 69 73 74 20 | 2b 3d 20 73 69 7a 65 6f |*)(list |+= sizeo|
|00005170| 66 28 74 79 70 65 29 29 | 29 5b 2d 31 5d 0a 23 20 |f(type))|)[-1].# |
|00005180| 64 65 66 69 6e 65 20 76 | 61 5f 65 6e 64 28 70 29 |define v|a_end(p)|
|00005190| 09 09 09 2f 2a 20 6e 6f | 74 68 69 6e 67 20 2a 2f |.../* no|thing */|
|000051a0| 0a 74 79 70 65 64 65 66 | 20 63 68 61 72 20 2a 76 |.typedef| char *v|
|000051b0| 61 5f 6c 69 73 74 3b 0a | 23 65 6e 64 69 66 20 2f |a_list;.|#endif /|
|000051c0| 2a 20 4e 4f 56 41 52 41 | 52 47 53 20 2a 2f 0a 23 |* NOVARA|RGS */.#|
|000051d0| 65 6e 64 69 66 20 2f 2a | 20 44 4f 53 20 2a 2f 0a |endif /*| DOS */.|
|000051e0| 23 65 6e 64 69 66 20 2f | 2a 20 5f 5f 53 54 44 43 |#endif /|* __STDC|
|000051f0| 5f 5f 20 2a 2f 0a 0a 2f | 2a 20 56 41 52 41 52 47 |__ */../|* VARARG|
|00005200| 53 20 2a 2f 0a 63 68 61 | 72 20 2a 63 61 74 0a 56 |S */.cha|r *cat.V|
|00005210| 41 5f 44 43 4c 28 63 68 | 61 72 2a 2c 20 73 31 29 |A_DCL(ch|ar*, s1)|
|00005220| 0a 7b 0a 20 20 20 20 72 | 65 67 69 73 74 65 72 20 |.{. r|egister |
|00005230| 63 68 61 72 20 2a 6e 65 | 77 73 74 72 3b 0a 20 20 |char *ne|wstr;. |
|00005240| 20 20 72 65 67 69 73 74 | 65 72 20 75 6e 73 69 67 | regist|er unsig|
|00005250| 6e 65 64 20 6c 65 6e 20 | 3d 20 31 3b 0a 20 20 20 |ned len |= 1;. |
|00005260| 20 63 68 61 72 20 2a 73 | 74 72 3b 0a 20 20 20 20 | char *s|tr;. |
|00005270| 76 61 5f 6c 69 73 74 20 | 61 72 67 73 3b 0a 0a 20 |va_list |args;.. |
|00005280| 20 20 20 2f 2a 20 66 69 | 6e 64 20 74 68 65 20 6c | /* fi|nd the l|
|00005290| 65 6e 67 74 68 20 77 68 | 69 63 68 20 6e 65 65 64 |ength wh|ich need|
|000052a0| 73 20 74 6f 20 62 65 20 | 61 6c 6c 6f 63 61 74 65 |s to be |allocate|
|000052b0| 64 20 2a 2f 0a 20 20 20 | 20 73 74 72 20 3d 20 56 |d */. | str = V|
|000052c0| 41 5f 53 54 41 52 54 28 | 61 72 67 73 2c 20 73 31 |A_START(|args, s1|
|000052d0| 2c 20 63 68 61 72 2a 29 | 3b 0a 20 20 20 20 66 6f |, char*)|;. fo|
|000052e0| 72 20 28 20 3b 20 73 74 | 72 3b 20 73 74 72 20 3d |r ( ; st|r; str =|
|000052f0| 20 76 61 5f 61 72 67 28 | 61 72 67 73 2c 20 63 68 | va_arg(|args, ch|
|00005300| 61 72 2a 29 29 0a 09 6c | 65 6e 20 2b 3d 20 73 74 |ar*))..l|en += st|
|00005310| 72 6c 65 6e 28 73 74 72 | 29 3b 0a 20 20 20 20 76 |rlen(str|);. v|
|00005320| 61 5f 65 6e 64 28 61 72 | 67 73 29 3b 0a 0a 20 20 |a_end(ar|gs);.. |
|00005330| 20 20 2f 2a 20 61 6c 6c | 6f 63 61 74 65 20 69 74 | /* all|ocate it|
|00005340| 20 2a 2f 0a 20 20 20 20 | 6e 65 77 73 74 72 20 3d | */. |newstr =|
|00005350| 20 6d 61 6c 6c 6f 63 28 | 6c 65 6e 29 3b 0a 20 20 | malloc(|len);. |
|00005360| 20 20 69 66 20 28 6e 65 | 77 73 74 72 20 3d 3d 20 | if (ne|wstr == |
|00005370| 30 29 0a 09 7b 0a 09 28 | 76 6f 69 64 29 20 66 70 |0)..{..(|void) fp|
|00005380| 72 69 6e 74 66 20 28 73 | 74 64 65 72 72 2c 20 22 |rintf (s|tderr, "|
|00005390| 25 73 3a 20 6f 75 74 20 | 6f 66 20 6d 61 6c 6c 6f |%s: out |of mallo|
|000053a0| 63 20 73 70 61 63 65 20 | 77 69 74 68 69 6e 20 63 |c space |within c|
|000053b0| 61 74 28 29 21 5c 6e 22 | 2c 0a 09 20 20 20 20 70 |at()!\n"|,.. p|
|000053c0| 72 6f 67 6e 61 6d 65 29 | 3b 0a 09 65 78 69 74 28 |rogname)|;..exit(|
|000053d0| 31 29 3b 0a 09 7d 0a 20 | 20 20 20 6e 65 77 73 74 |1);..}. | newst|
|000053e0| 72 5b 30 5d 20 3d 20 27 | 5c 30 27 3b 0a 0a 20 20 |r[0] = '|\0';.. |
|000053f0| 20 20 2f 2a 20 63 6f 70 | 79 20 69 6e 20 74 68 65 | /* cop|y in the|
|00005400| 20 73 74 72 69 6e 67 73 | 20 2a 2f 0a 20 20 20 20 | strings| */. |
|00005410| 73 74 72 20 3d 20 56 41 | 5f 53 54 41 52 54 28 61 |str = VA|_START(a|
|00005420| 72 67 73 2c 20 73 31 2c | 20 63 68 61 72 2a 29 3b |rgs, s1,| char*);|
|00005430| 0a 20 20 20 20 66 6f 72 | 20 28 20 3b 20 73 74 72 |. for| ( ; str|
|00005440| 3b 20 73 74 72 20 3d 20 | 76 61 5f 61 72 67 28 61 |; str = |va_arg(a|
|00005450| 72 67 73 2c 20 63 68 61 | 72 2a 29 29 0a 09 7b 0a |rgs, cha|r*))..{.|
|00005460| 09 28 76 6f 69 64 29 20 | 73 74 72 63 61 74 28 6e |.(void) |strcat(n|
|00005470| 65 77 73 74 72 2c 73 74 | 72 29 3b 0a 09 66 72 65 |ewstr,st|r);..fre|
|00005480| 65 28 73 74 72 29 3b 0a | 09 7d 0a 20 20 20 20 76 |e(str);.|.}. v|
|00005490| 61 5f 65 6e 64 28 61 72 | 67 73 29 3b 0a 0a 20 20 |a_end(ar|gs);.. |
|000054a0| 20 20 44 65 62 75 67 28 | 28 73 74 64 65 72 72 2c | Debug(|(stderr,|
|000054b0| 20 22 5c 74 63 61 74 20 | 63 72 65 61 74 65 64 20 | "\tcat |created |
|000054c0| 27 25 73 27 5c 6e 22 2c | 20 6e 65 77 73 74 72 29 |'%s'\n",| newstr)|
|000054d0| 29 3b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 6e 65 |);. r|eturn ne|
|000054e0| 77 73 74 72 3b 0a 7d 0a | 0a 2f 2a 0a 20 2a 20 64 |wstr;.}.|./*. * d|
|000054f0| 73 28 29 20 6d 61 6b 65 | 73 20 61 20 6d 61 6c 6c |s() make|s a mall|
|00005500| 6f 63 28 29 27 64 20 73 | 74 72 69 6e 67 20 66 72 |oc()'d s|tring fr|
|00005510| 6f 6d 20 6f 6e 65 20 74 | 68 61 74 27 73 20 6e 6f |om one t|hat's no|
|00005520| 74 2e 0a 20 2a 2f 0a 63 | 68 61 72 20 2a 64 73 28 |t.. */.c|har *ds(|
|00005530| 73 29 0a 63 68 61 72 20 | 2a 73 3b 0a 7b 0a 20 20 |s).char |*s;.{. |
|00005540| 20 20 72 65 67 69 73 74 | 65 72 20 63 68 61 72 20 | regist|er char |
|00005550| 2a 70 20 3d 20 6d 61 6c | 6c 6f 63 28 28 75 6e 73 |*p = mal|loc((uns|
|00005560| 69 67 6e 65 64 29 28 73 | 74 72 6c 65 6e 28 73 29 |igned)(s|trlen(s)|
|00005570| 2b 31 29 29 3b 0a 0a 20 | 20 20 20 69 66 20 28 70 |+1));.. | if (p|
|00005580| 29 0a 09 28 76 6f 69 64 | 29 20 73 74 72 63 70 79 |)..(void|) strcpy|
|00005590| 28 70 2c 73 29 3b 0a 20 | 20 20 20 65 6c 73 65 0a |(p,s);. | else.|
|000055a0| 09 7b 0a 09 28 76 6f 69 | 64 29 20 66 70 72 69 6e |.{..(voi|d) fprin|
|000055b0| 74 66 20 28 73 74 64 65 | 72 72 2c 20 22 25 73 3a |tf (stde|rr, "%s:|
|000055c0| 20 6d 61 6c 6c 6f 63 28 | 29 20 66 61 69 6c 65 64 | malloc(|) failed|
|000055d0| 21 5c 6e 22 2c 20 70 72 | 6f 67 6e 61 6d 65 29 3b |!\n", pr|ogname);|
|000055e0| 0a 09 65 78 69 74 28 31 | 29 3b 0a 09 7d 0a 20 20 |..exit(1|);..}. |
|000055f0| 20 20 72 65 74 75 72 6e | 20 70 3b 0a 7d 0a 0a 2f | return| p;.}../|
|00005600| 2a 20 72 65 74 75 72 6e | 20 61 20 76 69 73 69 62 |* return| a visib|
|00005610| 6c 65 20 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |le repre|sentatio|
|00005620| 6e 20 6f 66 20 61 20 63 | 68 61 72 61 63 74 65 72 |n of a c|haracter|
|00005630| 20 2a 2f 0a 63 68 61 72 | 20 2a 76 69 73 69 62 6c | */.char| *visibl|
|00005640| 65 28 63 29 0a 69 6e 74 | 20 63 3b 0a 7b 0a 20 20 |e(c).int| c;.{. |
|00005650| 20 20 73 74 61 74 69 63 | 20 63 68 61 72 20 62 75 | static| char bu|
|00005660| 66 5b 35 5d 3b 0a 0a 20 | 20 20 20 63 20 26 3d 20 |f[5];.. | c &= |
|00005670| 30 33 37 37 3b 0a 20 20 | 20 20 69 66 20 28 69 73 |0377;. | if (is|
|00005680| 70 72 69 6e 74 28 63 29 | 29 0a 09 7b 0a 09 62 75 |print(c)|)..{..bu|
|00005690| 66 5b 30 5d 20 3d 20 63 | 3b 0a 09 62 75 66 5b 31 |f[0] = c|;..buf[1|
|000056a0| 5d 20 3d 20 27 5c 30 27 | 3b 0a 09 7d 0a 20 20 20 |] = '\0'|;..}. |
|000056b0| 20 65 6c 73 65 0a 09 28 | 76 6f 69 64 29 20 73 70 | else..(|void) sp|
|000056c0| 72 69 6e 74 66 28 62 75 | 66 2c 22 5c 5c 25 30 33 |rintf(bu|f,"\\%03|
|000056d0| 6f 22 2c 63 29 3b 0a 20 | 20 20 20 72 65 74 75 72 |o",c);. | retur|
|000056e0| 6e 20 62 75 66 3b 0a 7d | 0a 0a 23 69 66 64 65 66 |n buf;.}|..#ifdef|
|000056f0| 20 4e 4f 54 4d 50 46 49 | 4c 45 0a 2f 2a 20 70 72 | NOTMPFI|LE./* pr|
|00005700| 6f 76 69 64 65 20 61 20 | 63 6f 6e 73 65 72 76 61 |ovide a |conserva|
|00005710| 74 69 76 65 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |tive ver|sion of |
|00005720| 74 6d 70 66 69 6c 65 28 | 29 20 2a 2f 0a 2f 2a 20 |tmpfile(|) */./* |
|00005730| 66 6f 72 20 74 68 6f 73 | 65 20 73 79 73 74 65 6d |for thos|e system|
|00005740| 73 20 77 69 74 68 6f 75 | 74 20 69 74 2e 20 2a 2f |s withou|t it. */|
|00005750| 0a 2f 2a 20 74 6d 70 66 | 69 6c 65 28 29 20 72 65 |./* tmpf|ile() re|
|00005760| 74 75 72 6e 73 20 61 20 | 46 49 4c 45 2a 20 6f 66 |turns a |FILE* of|
|00005770| 20 61 20 66 69 6c 65 20 | 6f 70 65 6e 65 64 20 2a | a file |opened *|
|00005780| 2f 0a 2f 2a 20 66 6f 72 | 20 72 65 61 64 26 77 72 |/./* for| read&wr|
|00005790| 69 74 65 2e 20 49 74 20 | 69 73 20 73 75 70 70 6f |ite. It |is suppo|
|000057a0| 73 65 64 20 74 6f 20 62 | 65 20 2a 2f 0a 2f 2a 20 |sed to b|e */./* |
|000057b0| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 72 65 |automati|cally re|
|000057c0| 6d 6f 76 65 64 20 77 68 | 65 6e 20 69 74 20 67 65 |moved wh|en it ge|
|000057d0| 74 73 20 63 6c 6f 73 65 | 64 2c 20 2a 2f 0a 2f 2a |ts close|d, */./*|
|000057e0| 20 62 75 74 20 68 65 72 | 65 20 77 65 20 70 72 6f | but her|e we pro|
|000057f0| 76 69 64 65 20 61 20 73 | 65 70 61 72 61 74 65 20 |vide a s|eparate |
|00005800| 72 6d 74 6d 70 66 69 6c | 65 28 29 20 2a 2f 0a 2f |rmtmpfil|e() */./|
|00005810| 2a 20 66 75 6e 63 74 69 | 6f 6e 20 74 6f 20 70 65 |* functi|on to pe|
|00005820| 72 66 6f 72 6d 20 74 68 | 61 74 20 66 75 6e 63 74 |rform th|at funct|
|00005830| 69 6f 6e 2e 20 2a 2f 0a | 2f 2a 20 41 6c 73 6f 20 |ion. */.|/* Also |
|00005840| 70 72 6f 76 69 64 65 20 | 73 65 76 65 72 61 6c 20 |provide |several |
|00005850| 70 6f 73 73 69 62 6c 65 | 20 66 69 6c 65 20 6e 61 |possible| file na|
|00005860| 6d 65 73 20 74 6f 20 2a | 2f 0a 2f 2a 20 74 72 79 |mes to *|/./* try|
|00005870| 20 66 6f 72 20 6f 70 65 | 6e 69 6e 67 2e 20 2a 2f | for ope|ning. */|
|00005880| 0a 73 74 61 74 69 63 20 | 63 68 61 72 20 2a 66 69 |.static |char *fi|
|00005890| 6c 65 34 74 6d 70 66 69 | 6c 65 20 3d 20 30 3b 0a |le4tmpfi|le = 0;.|
|000058a0| 0a 46 49 4c 45 20 2a 74 | 6d 70 66 69 6c 65 28 29 |.FILE *t|mpfile()|
|000058b0| 0a 7b 0a 20 20 20 20 73 | 74 61 74 69 63 20 63 68 |.{. s|tatic ch|
|000058c0| 61 72 20 2a 6c 69 73 74 | 74 6d 70 66 69 6c 65 73 |ar *list|tmpfiles|
|000058d0| 5b 5d 20 3d 0a 09 7b 0a | 09 22 2f 75 73 72 2f 74 |[] =..{.|."/usr/t|
|000058e0| 6d 70 2f 63 64 65 63 6c | 58 58 58 58 58 58 22 2c |mp/cdecl|XXXXXX",|
|000058f0| 0a 09 22 2f 74 6d 70 2f | 63 64 65 63 6c 58 58 58 |.."/tmp/|cdeclXXX|
|00005900| 58 58 58 22 2c 0a 09 22 | 2f 63 64 65 63 6c 58 58 |XXX",.."|/cdeclXX|
|00005910| 58 58 58 58 22 2c 0a 09 | 22 63 64 65 63 6c 58 58 |XXXX",..|"cdeclXX|
|00005920| 58 58 58 58 22 2c 0a 09 | 30 0a 09 7d 3b 0a 0a 20 |XXXX",..|0..};.. |
|00005930| 20 20 20 63 68 61 72 20 | 2a 2a 6c 69 73 74 70 20 | char |**listp |
|00005940| 3d 20 6c 69 73 74 74 6d | 70 66 69 6c 65 73 3b 0a |= listtm|pfiles;.|
|00005950| 20 20 20 20 66 6f 72 20 | 28 20 3b 20 2a 6c 69 73 | for |( ; *lis|
|00005960| 74 70 3b 20 6c 69 73 74 | 70 2b 2b 29 0a 09 7b 0a |tp; list|p++)..{.|
|00005970| 09 46 49 4c 45 20 2a 72 | 65 74 66 70 3b 0a 09 28 |.FILE *r|etfp;..(|
|00005980| 76 6f 69 64 29 20 6d 6b | 74 65 6d 70 28 2a 6c 69 |void) mk|temp(*li|
|00005990| 73 74 70 29 3b 0a 09 72 | 65 74 66 70 20 3d 20 66 |stp);..r|etfp = f|
|000059a0| 6f 70 65 6e 28 2a 6c 69 | 73 74 70 2c 20 22 77 2b |open(*li|stp, "w+|
|000059b0| 22 29 3b 0a 09 69 66 20 | 28 21 72 65 74 66 70 29 |");..if |(!retfp)|
|000059c0| 0a 09 20 20 20 20 63 6f | 6e 74 69 6e 75 65 3b 0a |.. co|ntinue;.|
|000059d0| 09 66 69 6c 65 34 74 6d | 70 66 69 6c 65 20 3d 20 |.file4tm|pfile = |
|000059e0| 2a 6c 69 73 74 70 3b 0a | 09 72 65 74 75 72 6e 20 |*listp;.|.return |
|000059f0| 72 65 74 66 70 3b 0a 09 | 7d 0a 0a 20 20 20 20 72 |retfp;..|}.. r|
|00005a00| 65 74 75 72 6e 20 30 3b | 0a 7d 0a 0a 76 6f 69 64 |eturn 0;|.}..void|
|00005a10| 20 72 6d 74 6d 70 66 69 | 6c 65 28 29 0a 7b 0a 20 | rmtmpfi|le().{. |
|00005a20| 20 20 20 69 66 20 28 66 | 69 6c 65 34 74 6d 70 66 | if (f|ile4tmpf|
|00005a30| 69 6c 65 29 0a 09 28 76 | 6f 69 64 29 20 75 6e 6c |ile)..(v|oid) unl|
|00005a40| 69 6e 6b 28 66 69 6c 65 | 34 74 6d 70 66 69 6c 65 |ink(file|4tmpfile|
|00005a50| 29 3b 0a 7d 0a 23 65 6c | 73 65 0a 2f 2a 20 70 72 |);.}.#el|se./* pr|
|00005a60| 6f 76 69 64 65 20 61 20 | 6d 6f 63 6b 20 72 6d 74 |ovide a |mock rmt|
|00005a70| 6d 70 66 69 6c 65 28 29 | 20 66 6f 72 20 6e 6f 72 |mpfile()| for nor|
|00005a80| 6d 61 6c 20 73 79 73 74 | 65 6d 73 20 2a 2f 0a 23 |mal syst|ems */.#|
|00005a90| 20 64 65 66 69 6e 65 20 | 72 6d 74 6d 70 66 69 6c | define |rmtmpfil|
|00005aa0| 65 28 29 09 2f 2a 20 6e | 6f 74 68 69 6e 67 20 2a |e()./* n|othing *|
|00005ab0| 2f 0a 23 65 6e 64 69 66 | 20 2f 2a 20 4e 4f 54 4d |/.#endif| /* NOTM|
|00005ac0| 50 46 49 4c 45 20 2a 2f | 0a 0a 23 69 66 6e 64 65 |PFILE */|..#ifnde|
|00005ad0| 66 20 4e 4f 47 45 54 4f | 50 54 0a 65 78 74 65 72 |f NOGETO|PT.exter|
|00005ae0| 6e 20 69 6e 74 20 6f 70 | 74 69 6e 64 3b 0a 23 65 |n int op|tind;.#e|
|00005af0| 6c 73 65 0a 2f 2a 20 54 | 68 69 73 20 69 73 20 61 |lse./* T|his is a|
|00005b00| 20 6d 69 6e 69 61 74 75 | 72 65 20 76 65 72 73 69 | miniatu|re versi|
|00005b10| 6f 6e 20 6f 66 20 67 65 | 74 6f 70 74 28 29 20 77 |on of ge|topt() w|
|00005b20| 68 69 63 68 20 77 69 6c | 6c 20 2a 2f 0a 2f 2a 20 |hich wil|l */./* |
|00005b30| 64 6f 20 6a 75 73 74 20 | 62 61 72 65 6c 79 20 65 |do just |barely e|
|00005b40| 6e 6f 75 67 68 20 66 6f | 72 20 75 73 20 74 6f 20 |nough fo|r us to |
|00005b50| 67 65 74 20 62 79 20 62 | 65 6c 6f 77 2e 20 2a 2f |get by b|elow. */|
|00005b60| 0a 2f 2a 20 4f 70 74 69 | 6f 6e 73 20 61 72 65 20 |./* Opti|ons are |
|00005b70| 6e 6f 74 20 61 6c 6c 6f | 77 65 64 20 74 6f 20 62 |not allo|wed to b|
|00005b80| 65 20 62 75 6e 63 68 65 | 64 20 75 70 20 74 6f 67 |e bunche|d up tog|
|00005b90| 65 74 68 65 72 2e 20 2a | 2f 0a 2f 2a 20 4f 70 74 |ether. *|/./* Opt|
|00005ba0| 69 6f 6e 20 61 72 67 75 | 6d 65 6e 74 73 20 61 72 |ion argu|ments ar|
|00005bb0| 65 20 6e 6f 74 20 73 75 | 70 70 6f 72 74 65 64 2e |e not su|pported.|
|00005bc0| 20 2a 2f 0a 69 6e 74 20 | 6f 70 74 69 6e 64 20 3d | */.int |optind =|
|00005bd0| 20 31 3b 0a 0a 69 6e 74 | 20 67 65 74 6f 70 74 28 | 1;..int| getopt(|
|00005be0| 61 72 67 63 2c 61 72 67 | 76 2c 6f 70 74 73 74 72 |argc,arg|v,optstr|
|00005bf0| 69 6e 67 29 0a 63 68 61 | 72 20 2a 2a 61 72 67 76 |ing).cha|r **argv|
|00005c00| 3b 0a 63 68 61 72 20 2a | 6f 70 74 73 74 72 69 6e |;.char *|optstrin|
|00005c10| 67 3b 0a 7b 0a 20 20 20 | 20 69 6e 74 20 72 65 74 |g;.{. | int ret|
|00005c20| 3b 0a 20 20 20 20 63 68 | 61 72 20 2a 70 3b 0a 0a |;. ch|ar *p;..|
|00005c30| 20 20 20 20 69 66 20 28 | 28 61 72 67 76 5b 6f 70 | if (|(argv[op|
|00005c40| 74 69 6e 64 5d 5b 30 5d | 20 21 3d 20 27 2d 27 29 |tind][0]| != '-')|
|00005c50| 0a 23 69 66 64 65 66 20 | 44 4f 53 0a 09 26 26 20 |.#ifdef |DOS..&& |
|00005c60| 28 61 72 67 76 5b 6f 70 | 74 69 6e 64 5d 5b 30 5d |(argv[op|tind][0]|
|00005c70| 20 21 3d 20 27 2f 27 29 | 0a 23 65 6e 64 69 66 20 | != '/')|.#endif |
|00005c80| 2f 2a 20 44 4f 53 20 2a | 2f 0a 09 29 0a 09 72 65 |/* DOS *|/..)..re|
|00005c90| 74 75 72 6e 20 45 4f 46 | 3b 0a 0a 20 20 20 20 72 |turn EOF|;.. r|
|00005ca0| 65 74 20 3d 20 61 72 67 | 76 5b 6f 70 74 69 6e 64 |et = arg|v[optind|
|00005cb0| 5d 5b 31 5d 3b 0a 20 20 | 20 20 6f 70 74 69 6e 64 |][1];. | optind|
|00005cc0| 2b 2b 3b 0a 0a 20 20 20 | 20 66 6f 72 20 28 70 20 |++;.. | for (p |
|00005cd0| 3d 20 6f 70 74 73 74 72 | 69 6e 67 3b 20 2a 70 3b |= optstr|ing; *p;|
|00005ce0| 20 70 2b 2b 29 0a 09 69 | 66 20 28 2a 70 20 3d 3d | p++)..i|f (*p ==|
|00005cf0| 20 72 65 74 29 0a 09 20 | 20 20 20 72 65 74 75 72 | ret).. | retur|
|00005d00| 6e 20 72 65 74 3b 0a 0a | 20 20 20 20 28 76 6f 69 |n ret;..| (voi|
|00005d10| 64 29 20 66 70 72 69 6e | 74 66 20 28 73 74 64 65 |d) fprin|tf (stde|
|00005d20| 72 72 2c 20 22 25 73 3a | 20 69 6c 6c 65 67 61 6c |rr, "%s:| illegal|
|00005d30| 20 6f 70 74 69 6f 6e 20 | 2d 2d 20 25 73 5c 6e 22 | option |-- %s\n"|
|00005d40| 2c 0a 09 70 72 6f 67 6e | 61 6d 65 2c 20 76 69 73 |,..progn|ame, vis|
|00005d50| 69 62 6c 65 28 72 65 74 | 29 29 3b 0a 0a 20 20 20 |ible(ret|));.. |
|00005d60| 20 72 65 74 75 72 6e 20 | 27 3f 27 3b 0a 7d 0a 23 | return |'?';.}.#|
|00005d70| 65 6e 64 69 66 0a 0c 0a | 2f 2a 20 74 68 65 20 68 |endif...|/* the h|
|00005d80| 65 6c 70 20 6d 65 73 73 | 61 67 65 73 20 2a 2f 0a |elp mess|ages */.|
|00005d90| 73 74 72 75 63 74 20 68 | 65 6c 70 73 74 72 75 63 |struct h|elpstruc|
|00005da0| 74 0a 20 20 20 20 7b 0a | 09 63 68 61 72 20 2a 74 |t. {.|.char *t|
|00005db0| 65 78 74 3b 09 2f 2a 20 | 67 65 6e 65 72 69 63 20 |ext;./* |generic |
|00005dc0| 74 65 78 74 20 2a 2f 0a | 09 63 68 61 72 20 2a 63 |text */.|.char *c|
|00005dd0| 70 70 74 65 78 74 3b 09 | 2f 2a 20 43 2b 2b 20 73 |pptext;.|/* C++ s|
|00005de0| 70 65 63 69 66 69 63 20 | 74 65 78 74 20 2a 2f 0a |pecific |text */.|
|00005df0| 20 20 20 20 7d 20 68 65 | 6c 70 74 65 78 74 5b 5d | } he|lptext[]|
|00005e00| 20 3d 0a 20 20 20 20 7b | 09 2f 2a 20 75 70 2d 74 | =. {|./* up-t|
|00005e10| 6f 20 32 33 20 6c 69 6e | 65 73 20 6f 66 20 68 65 |o 23 lin|es of he|
|00005e20| 6c 70 20 74 65 78 74 20 | 73 6f 20 69 74 20 66 69 |lp text |so it fi|
|00005e30| 74 73 20 6f 6e 20 28 32 | 34 78 38 30 29 20 73 63 |ts on (2|4x80) sc|
|00005e40| 72 65 65 6e 73 20 2a 2f | 0a 2f 2a 20 20 31 20 2a |reens */|./* 1 *|
|00005e50| 2f 7b 20 22 5b 5d 20 6d | 65 61 6e 73 20 6f 70 74 |/{ "[] m|eans opt|
|00005e60| 69 6f 6e 61 6c 3b 20 7b | 7d 20 6d 65 61 6e 73 20 |ional; {|} means |
|00005e70| 31 20 6f 72 20 6d 6f 72 | 65 3b 20 3c 3e 20 6d 65 |1 or mor|e; <> me|
|00005e80| 61 6e 73 20 64 65 66 69 | 6e 65 64 20 65 6c 73 65 |ans defi|ned else|
|00005e90| 77 68 65 72 65 22 2c 20 | 30 20 7d 2c 0a 2f 2a 20 |where", |0 },./* |
|00005ea0| 20 32 20 2a 2f 7b 20 22 | 20 20 63 6f 6d 6d 61 6e | 2 */{ "| comman|
|00005eb0| 64 73 20 61 72 65 20 73 | 65 70 61 72 61 74 65 64 |ds are s|eparated|
|00005ec0| 20 62 79 20 27 3b 27 20 | 61 6e 64 20 6e 65 77 6c | by ';' |and newl|
|00005ed0| 69 6e 65 73 22 2c 20 30 | 20 7d 2c 0a 2f 2a 20 20 |ines", 0| },./* |
|00005ee0| 33 20 2a 2f 7b 20 22 63 | 6f 6d 6d 61 6e 64 3a 22 |3 */{ "c|ommand:"|
|00005ef0| 2c 20 30 20 7d 2c 0a 2f | 2a 20 20 34 20 2a 2f 7b |, 0 },./|* 4 */{|
|00005f00| 20 22 20 20 64 65 63 6c | 61 72 65 20 3c 6e 61 6d | " decl|are <nam|
|00005f10| 65 3e 20 61 73 20 3c 65 | 6e 67 6c 69 73 68 3e 22 |e> as <e|nglish>"|
|00005f20| 2c 20 30 20 7d 2c 0a 2f | 2a 20 20 35 20 2a 2f 7b |, 0 },./|* 5 */{|
|00005f30| 20 22 20 20 63 61 73 74 | 20 3c 6e 61 6d 65 3e 20 | " cast| <name> |
|00005f40| 69 6e 74 6f 20 3c 65 6e | 67 6c 69 73 68 3e 22 2c |into <en|glish>",|
|00005f50| 20 30 20 7d 2c 0a 2f 2a | 20 20 36 20 2a 2f 7b 20 | 0 },./*| 6 */{ |
|00005f60| 22 20 20 65 78 70 6c 61 | 69 6e 20 3c 67 69 62 62 |" expla|in <gibb|
|00005f70| 65 72 69 73 68 3e 22 2c | 20 30 20 7d 2c 0a 2f 2a |erish>",| 0 },./*|
|00005f80| 20 20 37 20 2a 2f 7b 20 | 22 20 20 73 65 74 20 6f | 7 */{ |" set o|
|00005f90| 72 20 73 65 74 20 6f 70 | 74 69 6f 6e 73 22 2c 20 |r set op|tions", |
|00005fa0| 30 20 7d 2c 0a 2f 2a 20 | 20 38 20 2a 2f 7b 20 22 |0 },./* | 8 */{ "|
|00005fb0| 20 20 68 65 6c 70 2c 20 | 3f 22 2c 20 30 20 7d 2c | help, |?", 0 },|
|00005fc0| 0a 2f 2a 20 20 39 20 2a | 2f 7b 20 22 20 20 71 75 |./* 9 *|/{ " qu|
|00005fd0| 69 74 20 6f 72 20 65 78 | 69 74 22 2c 20 30 20 7d |it or ex|it", 0 }|
|00005fe0| 2c 0a 2f 2a 20 31 30 20 | 2a 2f 7b 20 22 65 6e 67 |,./* 10 |*/{ "eng|
|00005ff0| 6c 69 73 68 3a 22 2c 20 | 30 20 7d 2c 0a 2f 2a 20 |lish:", |0 },./* |
|00006000| 31 31 20 2a 2f 7b 20 22 | 20 20 66 75 6e 63 74 69 |11 */{ "| functi|
|00006010| 6f 6e 20 5b 28 20 3c 64 | 65 63 6c 2d 6c 69 73 74 |on [( <d|ecl-list|
|00006020| 3e 20 29 5d 20 72 65 74 | 75 72 6e 69 6e 67 20 3c |> )] ret|urning <|
|00006030| 65 6e 67 6c 69 73 68 3e | 22 2c 20 30 20 7d 2c 0a |english>|", 0 },.|
|00006040| 2f 2a 20 31 32 20 2a 2f | 7b 20 22 20 20 61 72 72 |/* 12 */|{ " arr|
|00006050| 61 79 20 5b 3c 6e 75 6d | 62 65 72 3e 5d 20 6f 66 |ay [<num|ber>] of|
|00006060| 20 3c 65 6e 67 6c 69 73 | 68 3e 22 2c 20 30 20 7d | <englis|h>", 0 }|
|00006070| 2c 0a 2f 2a 20 31 33 20 | 2a 2f 7b 20 22 20 20 5b |,./* 13 |*/{ " [|
|00006080| 7b 20 63 6f 6e 73 74 20 | 7c 20 76 6f 6c 61 74 69 |{ const || volati|
|00006090| 6c 65 20 7c 20 6e 6f 61 | 6c 69 61 73 20 7d 5d 20 |le | noa|lias }] |
|000060a0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 3c 65 6e 67 6c |pointer |to <engl|
|000060b0| 69 73 68 3e 22 2c 0a 09 | 20 20 22 20 20 5b 7b 63 |ish>",..| " [{c|
|000060c0| 6f 6e 73 74 7c 76 6f 6c | 61 74 69 6c 65 7d 5d 20 |onst|vol|atile}] |
|000060d0| 7b 70 6f 69 6e 74 65 72 | 7c 72 65 66 65 72 65 6e |{pointer||referen|
|000060e0| 63 65 7d 20 74 6f 20 5b | 6d 65 6d 62 65 72 20 6f |ce} to [|member o|
|000060f0| 66 20 63 6c 61 73 73 20 | 3c 6e 61 6d 65 3e 5d 20 |f class |<name>] |
|00006100| 3c 65 6e 67 6c 69 73 68 | 3e 22 20 7d 2c 0a 2f 2a |<english|>" },./*|
|00006110| 20 31 34 20 2a 2f 7b 20 | 22 20 20 3c 74 79 70 65 | 14 */{ |" <type|
|00006120| 3e 22 2c 20 30 20 7d 2c | 0a 2f 2a 20 31 35 20 2a |>", 0 },|./* 15 *|
|00006130| 2f 7b 20 22 74 79 70 65 | 3a 22 2c 20 30 20 7d 2c |/{ "type|:", 0 },|
|00006140| 0a 2f 2a 20 31 36 20 2a | 2f 7b 20 22 20 20 7b 5b |./* 16 *|/{ " {[|
|00006150| 3c 73 74 6f 72 61 67 65 | 2d 63 6c 61 73 73 3e 5d |<storage|-class>]|
|00006160| 20 5b 7b 3c 6d 6f 64 69 | 66 69 65 72 3e 7d 5d 20 | [{<modi|fier>}] |
|00006170| 5b 3c 43 2d 74 79 70 65 | 3e 5d 7d 22 2c 20 30 20 |[<C-type|>]}", 0 |
|00006180| 7d 2c 0a 2f 2a 20 31 37 | 20 2a 2f 7b 20 22 20 20 |},./* 17| */{ " |
|00006190| 7b 20 73 74 72 75 63 74 | 20 7c 20 75 6e 69 6f 6e |{ struct| | union|
|000061a0| 20 7c 20 65 6e 75 6d 20 | 7d 20 3c 6e 61 6d 65 3e | | enum |} <name>|
|000061b0| 22 2c 0a 09 20 20 22 20 | 20 7b 73 74 72 75 63 74 |",.. " | {struct|
|000061c0| 7c 63 6c 61 73 73 7c 75 | 6e 69 6f 6e 7c 65 6e 75 ||class|u|nion|enu|
|000061d0| 6d 7d 20 3c 6e 61 6d 65 | 3e 22 20 7d 2c 0a 2f 2a |m} <name|>" },./*|
|000061e0| 20 31 38 20 2a 2f 7b 20 | 22 64 65 63 6c 6c 69 73 | 18 */{ |"decllis|
|000061f0| 74 3a 20 61 20 63 6f 6d | 6d 61 20 73 65 70 61 72 |t: a com|ma separ|
|00006200| 61 74 65 64 20 6c 69 73 | 74 20 6f 66 20 3c 6e 61 |ated lis|t of <na|
|00006210| 6d 65 3e 2c 20 3c 65 6e | 67 6c 69 73 68 3e 20 6f |me>, <en|glish> o|
|00006220| 72 20 3c 6e 61 6d 65 3e | 20 61 73 20 3c 65 6e 67 |r <name>| as <eng|
|00006230| 6c 69 73 68 3e 22 2c 20 | 30 20 7d 2c 0a 2f 2a 20 |lish>", |0 },./* |
|00006240| 31 39 20 2a 2f 7b 20 22 | 6e 61 6d 65 3a 20 61 20 |19 */{ "|name: a |
|00006250| 43 20 69 64 65 6e 74 69 | 66 69 65 72 22 2c 20 30 |C identi|fier", 0|
|00006260| 20 7d 2c 0a 2f 2a 20 32 | 30 20 2a 2f 7b 20 22 67 | },./* 2|0 */{ "g|
|00006270| 69 62 62 65 72 69 73 68 | 3a 20 61 20 43 20 64 65 |ibberish|: a C de|
|00006280| 63 6c 61 72 61 74 69 6f | 6e 2c 20 6c 69 6b 65 20 |claratio|n, like |
|00006290| 27 69 6e 74 20 2a 78 27 | 2c 20 6f 72 20 63 61 73 |'int *x'|, or cas|
|000062a0| 74 2c 20 6c 69 6b 65 20 | 27 28 69 6e 74 20 2a 29 |t, like |'(int *)|
|000062b0| 78 27 22 2c 20 30 20 7d | 2c 0a 2f 2a 20 32 31 20 |x'", 0 }|,./* 21 |
|000062c0| 2a 2f 7b 20 22 73 74 6f | 72 61 67 65 2d 63 6c 61 |*/{ "sto|rage-cla|
|000062d0| 73 73 3a 20 65 78 74 65 | 72 6e 2c 20 73 74 61 74 |ss: exte|rn, stat|
|000062e0| 69 63 2c 20 61 75 74 6f | 2c 20 72 65 67 69 73 74 |ic, auto|, regist|
|000062f0| 65 72 22 2c 20 30 20 7d | 2c 0a 2f 2a 20 32 32 20 |er", 0 }|,./* 22 |
|00006300| 2a 2f 7b 20 22 43 2d 74 | 79 70 65 3a 20 69 6e 74 |*/{ "C-t|ype: int|
|00006310| 2c 20 63 68 61 72 2c 20 | 66 6c 6f 61 74 2c 20 64 |, char, |float, d|
|00006320| 6f 75 62 6c 65 2c 20 6f | 72 20 76 6f 69 64 22 2c |ouble, o|r void",|
|00006330| 20 30 20 7d 2c 0a 2f 2a | 20 32 33 20 2a 2f 7b 20 | 0 },./*| 23 */{ |
|00006340| 22 6d 6f 64 69 66 69 65 | 72 3a 20 73 68 6f 72 74 |"modifie|r: short|
|00006350| 2c 20 6c 6f 6e 67 2c 20 | 73 69 67 6e 65 64 2c 20 |, long, |signed, |
|00006360| 75 6e 73 69 67 6e 65 64 | 2c 20 63 6f 6e 73 74 2c |unsigned|, const,|
|00006370| 20 76 6f 6c 61 74 69 6c | 65 2c 20 6f 72 20 6e 6f | volatil|e, or no|
|00006380| 61 6c 69 61 73 22 2c 0a | 09 20 20 22 6d 6f 64 69 |alias",.|. "modi|
|00006390| 66 69 65 72 3a 20 73 68 | 6f 72 74 2c 20 6c 6f 6e |fier: sh|ort, lon|
|000063a0| 67 2c 20 73 69 67 6e 65 | 64 2c 20 75 6e 73 69 67 |g, signe|d, unsig|
|000063b0| 6e 65 64 2c 20 63 6f 6e | 73 74 2c 20 6f 72 20 76 |ned, con|st, or v|
|000063c0| 6f 6c 61 74 69 6c 65 22 | 20 7d 2c 0a 09 7b 20 30 |olatile"| },..{ 0|
|000063d0| 2c 20 30 20 7d 0a 20 20 | 20 20 7d 3b 0a 0a 2f 2a |, 0 }. | };../*|
|000063e0| 20 50 72 69 6e 74 20 6f | 75 74 20 74 68 65 20 68 | Print o|ut the h|
|000063f0| 65 6c 70 20 74 65 78 74 | 20 2a 2f 0a 76 6f 69 64 |elp text| */.void|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.